diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-10 10:34:00 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-10 10:34:00 +0100 |
commit | 677304ba3ecbd204fa2726e6820de84ad09bd868 (patch) | |
tree | bd19fbf2f1a0cddad1980fe15cf4c228867c5d69 /newspipe/lib/article_utils.py | |
parent | Updated README. (diff) | |
download | newspipe-677304ba3ecbd204fa2726e6820de84ad09bd868.tar.gz newspipe-677304ba3ecbd204fa2726e6820de84ad09bd868.tar.bz2 newspipe-677304ba3ecbd204fa2726e6820de84ad09bd868.zip |
Added a tiny portion of black magic.
Diffstat (limited to 'newspipe/lib/article_utils.py')
-rw-r--r-- | newspipe/lib/article_utils.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/newspipe/lib/article_utils.py b/newspipe/lib/article_utils.py index 77cea397..5152f008 100644 --- a/newspipe/lib/article_utils.py +++ b/newspipe/lib/article_utils.py @@ -77,7 +77,12 @@ def get_article_content(entry): async def get_article_details(entry, fetch=True): article_link = entry.get("link") article_title = html.unescape(entry.get("title", "")) - if fetch and application.config['CRAWLER_RESOLV'] and article_link or not article_title: + if ( + fetch + and application.config["CRAWLER_RESOLV"] + and article_link + or not article_title + ): try: # resolves URL behind proxies (like feedproxy.google.com) response = await newspipe_get(article_link, timeout=5) |