Economist: Dont download interactive articles

They dont work well and break conversion to EPUB with giant embedded SVG
images. Fixes #2000279 [Fetch news for The Economist fails](https://bugs.launchpad.net/calibre/+bug/2000279)
This commit is contained in:
Kovid Goyal 2022-12-22 11:04:09 +05:30
parent 732a92b153
commit 213dee41da
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 0 deletions

View File

@ -307,6 +307,9 @@ class Economist(BasicNewsRecipe):
sub = safe_dict(part, "print", "subheadline") or ''
if sub and section != sub:
desc = sub + ' :: ' + desc
if '/interactive/' in url:
self.log('Skipping interactive article:', title, url)
continue
feeds_dict[section].append({"title": title, "url": url, "description": desc})
self.log(' ', title, url, '\n ', desc)
return [(section, articles) for section, articles in feeds_dict.items()]

View File

@ -307,6 +307,9 @@ class Economist(BasicNewsRecipe):
sub = safe_dict(part, "print", "subheadline") or ''
if sub and section != sub:
desc = sub + ' :: ' + desc
if '/interactive/' in url:
self.log('Skipping interactive article:', title, url)
continue
feeds_dict[section].append({"title": title, "url": url, "description": desc})
self.log(' ', title, url, '\n ', desc)
return [(section, articles) for section, articles in feeds_dict.items()]