mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Fixes issues with RSS feeds not being parsed correctly.
This commit is contained in:
parent
a74b12f519
commit
ce9f079136
@ -19,7 +19,7 @@
|
|||||||
import os
|
import os
|
||||||
import xml.dom.minidom
|
import xml.dom.minidom
|
||||||
import re
|
import re
|
||||||
from urlparse import urlparse, urljoin
|
import urlparse
|
||||||
|
|
||||||
import sickbeard
|
import sickbeard
|
||||||
import generic
|
import generic
|
||||||
@ -126,6 +126,8 @@ class TorrentRssProvider(generic.TorrentProvider):
|
|||||||
|
|
||||||
def getURL(self, url, post_data=None, headers=None):
|
def getURL(self, url, post_data=None, headers=None):
|
||||||
try:
|
try:
|
||||||
|
parsed = list(urlparse.urlparse(url))
|
||||||
|
parsed[2] = re.sub("/{2,}", "/", parsed[2]) # replace two or more / with one
|
||||||
response = requests.get(url, verify=False)
|
response = requests.get(url, verify=False)
|
||||||
except (requests.exceptions.ConnectionError, requests.exceptions.HTTPError), e:
|
except (requests.exceptions.ConnectionError, requests.exceptions.HTTPError), e:
|
||||||
logger.log(u"Error loading " + self.name + " URL: " + ex(e), logger.ERROR)
|
logger.log(u"Error loading " + self.name + " URL: " + ex(e), logger.ERROR)
|
||||||
|
Loading…
Reference in New Issue
Block a user