Upgrading to 1.4
Most installations upgrade without changes. Check the items below if you run
watch, the feed server, batch --from-opml, or use newsworker as a library.
Requirements
- Python 3.10 or newer (3.9 reached end of life in October 2025).
- qddate 1.0.16 or newer is installed automatically.
Requests look different to sites
- The User-Agent is now
newsworker/<version> (+https://github.com/ivbeg/newsworker)instead of a Chrome 23 string.robots.txtrules fornewsworkernow apply. Setuser_agentor--user-agentto keep a custom one. - Requests to one site are paced: at most
per_host_concurrency(default 2) at a time, honouringCrawl-delayandRetry-After. Abatchover many pages of one site can take longer; raise the limit only for sites you own. HTTP(S)_PROXY,NO_PROXYand.netrcare ignored unlesstrust_env_proxy: true. Configureproxyexplicitly or enable the setting.Authorization,Cookieand yourextra_headersare dropped on redirects to another origin, and are never sent to delivery endpoints.
Feed content
-
unique_idcomes from the item link, so editing a teaser no longer makes an item "new". The previous text hash is kept ascontent_hash.watchrecognises items seen by 1.3 under their old id, so an upgrade does not deliver them again. Feed readers that key on the RSSguidmay show items once more after the upgrade. -
Publication dates are timezone-aware UTC
datetimevalues. Offsets in the page are honoured; other dates usedefault_timezone. Normalise your own values before comparing:from newsworker.tools import normalize_datetimesame_instant = item["pubdate"] == normalize_datetime(old_value, "Europe/Paris") -
Dates before 1970 or more than a year ahead are ignored, and two-digit years resolve to the nearest past century (
25/7/22is 2022). -
A URL that serves RSS, Atom or JSON Feed is read as a feed (strategy
native_feed). Setnative_feeds: falseto scrape it as HTML as before. -
JSON-LD and microdata article lists are used when a page has them (
structured_data: falseto disable). -
Full article content carries
content_kind(textorhtml); JSON Feed usescontent_text/content_htmlaccordingly. Enclosures are emitted only when both the byte length and media type are known. -
javascript:,data:and other non-http(s) links are removed from items. -
Feed dictionaries are described by
newsworker.model.Feed/Item; plain dicts still work.
Commands
batch --from-opmlreads each outline's feed (xmlUrl); add--opml-pagesto extract from thehtmlUrlpages as before.scanof an unreachable page exits with status1;extractandscanaccept--fail-on-empty(status3).- A finite
watch(--max-iterations,--once) exits non-zero when a source failed or deliveries are still pending. --format rss|atom|…is honoured bywatchon stdout.
Feed server
- With
feed_signing_keyset,/feedrequires an API token or a signed link (newsworker feed-url URL). ?refresh=1is honoured only for loopback clients and token holders.ETagis a weak validator over the feed content andLast-Modifiedis the newest item date, so readers get304for unchanged feeds.- RSS/Atom
rel="self"and JSON Feedfeed_urlpoint to the server's/feedURL; setpublic_base_urlbehind a reverse proxy. - Browsers opening
/get a form to preview a page and copy its feed link; other clients still get the text help. /metricsneeds themetricsextra andmetrics_enabled: true.
Configuration
Precedence is command line, then environment, then YAML, then defaults. Commands no longer replace a configured User-Agent or filter length when the matching option is not given. Every setting, its default and environment variable is listed in the settings reference.
Library
- Importing
newsworkerno longer configures the root logger or silences urllib3 warnings; the CLI does that for itself. newsworker.specis a package; everything importable before still is.