Private GIT

Skip to content
Snippets Groups Projects
Commit 80e6f80c authored by Dustyn Gibson's avatar Dustyn Gibson
Browse files

Merge pull request #1942 from miigotu/rarbg-json

Fix SiCKRAGETV/sickrage-issues#1554
parents c70378f3 e35dfbe4
Branches
Tags V4.2.0.01
No related merge requests found
......@@ -274,6 +274,11 @@ class RarbgProvider(generic.TorrentProvider):
return results
logger.log(u'{name} Using new token'.format(name=self.name), logger.DEBUG)
continue
if re.search('<div id="error">.*</div>', data):
logger.log(u'{name} {proxy} does not support https.'.format(name=self.name, proxy=self.proxy.getProxyURL()), logger.DEBUG)
searchURL = searchURL.replace(u'https', 'http')
continue
#No error found break
break
else:
......@@ -283,7 +288,11 @@ class RarbgProvider(generic.TorrentProvider):
continue
try:
data_json = json.loads(data)
data = re.search('\[\{\"f\".*\}\]', data)
if data is not None:
data_json = json.loads(data.group())
else:
data_json = {}
except Exception as e:
logger.log(u'{name} json load failed: {traceback_info}'.format(name=self.name, traceback_info=traceback.format_exc()), logger.DEBUG)
logger.log(u'{name} json load failed. Data dump = {data}'.format(name=self.name, data=data), logger.DEBUG)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment