1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2024-12-21 23:32:23 +00:00

FIX: RSS error when retrieving some feeds

This commit is contained in:
evilhero 2016-09-07 01:34:51 -04:00
parent a036e554d2
commit eea07cfc3f

View file

@ -147,12 +147,11 @@ def torrents(pickfeed=None, seriesname=None, issue=None, feedinfo=None):
try:
cf_cookievalue = None
scraper = cfscrape.create_scraper()
if pickfeed == '2':
scraper = cfscrape.create_scraper()
cf_cookievalue, cf_user_agent = scraper.get_tokens(feed)
headers = {'Accept-encoding': 'gzip',
'User-Agent': cf_user_agent}
logger.info(cf_cookievalue)
if cf_cookievalue:
r = scraper.get(feed, verify=verify, cookies=cf_cookievalue, headers=headers)