diff --git a/later42/libs/content.py b/later42/libs/content.py index 5cad6c1..29cde73 100644 --- a/later42/libs/content.py +++ b/later42/libs/content.py @@ -13,9 +13,10 @@ def sanitize_img_size(html: str): def get_content(url: str): - url = settings.READABILITY_HOST.rstrip( - '/') + '/api/content/v1/parser?url=' + url - try: - return requests.get(url).json() - except KeyError: - return None + if settings.READABILITY_HOST: + url = settings.READABILITY_HOST.rstrip( + '/') + '/api/content/v1/parser?url=' + url + try: + return requests.get(url).json() + except KeyError: + return None diff --git a/later42/templates/index.html b/later42/templates/index.html index 298fd4b..2977b3c 100644 --- a/later42/templates/index.html +++ b/later42/templates/index.html @@ -21,9 +21,7 @@
{% endif %}