mirror of
https://github.com/evilhero/mylar
synced 2025-01-03 05:24:43 +00:00
FIX: RSS error when retrieving some feeds
This commit is contained in:
parent
a036e554d2
commit
eea07cfc3f
1 changed files with 1 additions and 2 deletions
|
@ -147,12 +147,11 @@ def torrents(pickfeed=None, seriesname=None, issue=None, feedinfo=None):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cf_cookievalue = None
|
cf_cookievalue = None
|
||||||
if pickfeed == '2':
|
|
||||||
scraper = cfscrape.create_scraper()
|
scraper = cfscrape.create_scraper()
|
||||||
|
if pickfeed == '2':
|
||||||
cf_cookievalue, cf_user_agent = scraper.get_tokens(feed)
|
cf_cookievalue, cf_user_agent = scraper.get_tokens(feed)
|
||||||
headers = {'Accept-encoding': 'gzip',
|
headers = {'Accept-encoding': 'gzip',
|
||||||
'User-Agent': cf_user_agent}
|
'User-Agent': cf_user_agent}
|
||||||
logger.info(cf_cookievalue)
|
|
||||||
|
|
||||||
if cf_cookievalue:
|
if cf_cookievalue:
|
||||||
r = scraper.get(feed, verify=verify, cookies=cf_cookievalue, headers=headers)
|
r = scraper.get(feed, verify=verify, cookies=cf_cookievalue, headers=headers)
|
||||||
|
|
Loading…
Reference in a new issue