Skip to main content

batch

Extracts feeds from a list of pages concurrently, writing one file per URL.

newsworker batch [OPTIONS]
OptionAliasDefaultDescription
--urls-file—Text file with one page URL per line.
--from-opml—OPML file; each outline's xmlUrl feed is read and normalised.
--opml-pagesfalseExtract from each outline's htmlUrl page instead of its feed.
--output-dir-d.Directory for one output file per URL.
--format-fjsonOutput format (same set as extract).
--max-workers4Concurrent workers (thread pool, or aiohttp when --async).
--asyncfalseUse the optional aiohttp transport (newsworker[async]).
--manifest—Write a run manifest to this path.
--manifest-formatjsonManifest format: json or csv.
--failure-policystrictstrict or partial-success.
--no-cachefalseBypass caches for this run.
--config-c(default)Path to settings YAML.
--verbose-vfalseVerbose logging.
newsworker batch --urls-file urls.txt --output-dir out --format rss
newsworker batch --from-opml feeds.opml -d out -f json --max-workers 8
pip install 'newsworker[async]'
newsworker batch --urls-file urls.txt -d out --async

Both transports apply the same fetch policy, robots.txt rules, per-host pacing, cookies (cookies_file) and content cache: a fresh cached page is not fetched again and a stale one is revalidated with If-None-Match / If-Modified-Since.

See batch manifests for artifact naming, record fields, and exit codes.