aboutsummaryrefslogtreecommitdiff
path: root/newspipe/lib/feed_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'newspipe/lib/feed_utils.py')
-rw-r--r--newspipe/lib/feed_utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/newspipe/lib/feed_utils.py b/newspipe/lib/feed_utils.py
index 9f1e2354..a4c6c275 100644
--- a/newspipe/lib/feed_utils.py
+++ b/newspipe/lib/feed_utils.py
@@ -3,10 +3,10 @@ import urllib
import logging
import requests
import feedparser
-from conf import CRAWLER_USER_AGENT
from bs4 import BeautifulSoup, SoupStrainer
-from lib.utils import try_keys, try_get_icon_url, rebuild_url
+from newspipe.bootstrap import application
+from newspipe.lib.utils import try_keys, try_get_icon_url, rebuild_url
logger = logging.getLogger(__name__)
logging.captureWarnings(True)
@@ -39,7 +39,7 @@ def escape_keys(*keys):
@escape_keys("title", "description")
def construct_feed_from(url=None, fp_parsed=None, feed=None, query_site=True):
- requests_kwargs = {"headers": {"User-Agent": CRAWLER_USER_AGENT}, "verify": False}
+ requests_kwargs = {"headers": {"User-Agent": application.config['CRAWLER_USER_AGENT']}, "verify": False}
if url is None and fp_parsed is not None:
url = fp_parsed.get("url")
if url is not None and fp_parsed is None:
bgstack15