Private GIT

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

response is content already, cant check status or text. TorrentLeech...

response is content already, cant check status or text. TorrentLeech SiCKRAGETV/sickrage-issues/issues/2568
parent 8ab84132
Branches
Tags
No related merge requests found
...@@ -84,15 +84,12 @@ class TorrentLeechProvider(generic.TorrentProvider): ...@@ -84,15 +84,12 @@ class TorrentLeechProvider(generic.TorrentProvider):
'login': 'submit', 'login': 'submit',
} }
try:
response = self.getURL(self.urls['login'], post_data=login_params, timeout=30) response = self.getURL(self.urls['login'], post_data=login_params, timeout=30)
except Exception as e: if not response:
logger.log(u'Unable to connect to ' + self.name + ' provider: ' + ex(e), logger.ERROR) logger.log(u'Unable to connect to ' + self.name + ' provider: ' + ex(e), logger.ERROR)
return False return False
if re.search('Invalid Username/password', response.text) \ if re.search('Invalid Username/password', response) or re.search('<title>Login :: TorrentLeech.org</title>', response):
or re.search('<title>Login :: TorrentLeech.org</title>', response.text) \
or response.status_code == 401:
logger.log(u'Invalid username or password for ' + self.name + ' Check your settings', logger.ERROR) logger.log(u'Invalid username or password for ' + self.name + ' Check your settings', logger.ERROR)
return False return False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment