rss: fallback to http is needed
This commit is contained in:
parent
e8852b3c53
commit
9f84f60d55
1 changed files with 9 additions and 1 deletions
|
@ -45,7 +45,15 @@ class RSS(AbstractSite):
|
|||
try:
|
||||
feed = podcastparser.parse(url, urllib.request.urlopen(req, timeout=3))
|
||||
except:
|
||||
return None
|
||||
url = url.replace("https://", "http://")
|
||||
req = urllib.request.Request(url)
|
||||
req.add_header("User-Agent", settings.NEODB_USER_AGENT)
|
||||
try:
|
||||
feed = podcastparser.parse(
|
||||
url, urllib.request.urlopen(req, timeout=3)
|
||||
)
|
||||
except:
|
||||
return None
|
||||
if settings.DOWNLOADER_SAVEDIR:
|
||||
pickle.dump(
|
||||
feed,
|
||||
|
|
Loading…
Add table
Reference in a new issue