1
0
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:
echel0n 2014-04-25 04:45:34 -07:00
parent a74b12f519
commit ce9f079136

View File

@ -19,7 +19,7 @@
import os
import xml.dom.minidom
import re
from urlparse import urlparse, urljoin
import urlparse
import sickbeard
import generic
@ -126,6 +126,8 @@ class TorrentRssProvider(generic.TorrentProvider):
def getURL(self, url, post_data=None, headers=None):
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)
except (requests.exceptions.ConnectionError, requests.exceptions.HTTPError), e:
logger.log(u"Error loading " + self.name + " URL: " + ex(e), logger.ERROR)