mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-18 07:15:13 -05:00
Merge pull request #1326 from flightlevel/patch-2
Improved logging to detect CloudFlare blocking
This commit is contained in:
commit
f89fddbdfb
@ -112,6 +112,10 @@ class FreshOnTVProvider(generic.TorrentProvider):
|
|||||||
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
|
||||||
|
|
||||||
|
if re.search('DDoS protection by CloudFlare', response.text):
|
||||||
|
logger.log(u'Unable to login to ' + self.name + ' due to CloudFlare DDoS javascript check.', logger.ERROR)
|
||||||
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if requests.utils.dict_from_cookiejar(self.session.cookies)['uid'] and requests.utils.dict_from_cookiejar(self.session.cookies)['pass']:
|
if requests.utils.dict_from_cookiejar(self.session.cookies)['uid'] and requests.utils.dict_from_cookiejar(self.session.cookies)['pass']:
|
||||||
self._uid = requests.utils.dict_from_cookiejar(self.session.cookies)['uid']
|
self._uid = requests.utils.dict_from_cookiejar(self.session.cookies)['uid']
|
||||||
|
Loading…
Reference in New Issue
Block a user