Fix multiple SpeedCD cookie.

This commit is contained in:
JackDandy 2017-05-05 16:34:48 +01:00
parent a016c3b845
commit 0072c3cc76
2 changed files with 8 additions and 1 deletions

View file

@ -1,4 +1,9 @@
### 0.12.15 (2017-05-04 00:40:00 UTC)
### 0.12.16 (2017-05-05 16:40:00 UTC)
* Fix multiple SpeedCD cookie
### 0.12.15 (2017-05-04 00:40:00 UTC)
* Remove provider Nyaa
* Change improve RSS validation (particularly for anime)

View file

@ -45,6 +45,8 @@ class SpeedCDProvider(generic.TorrentProvider):
return super(SpeedCDProvider, self)._authorised(
logged_in=(lambda y='': all(
[self.session.cookies.get_dict(domain='.speed.cd') and
self.session.cookies.clear('.speed.cd') is None or True] +
['RSS' in y, 'type="password"' not in y, self.has_all_cookies(['speedian'], 'inSpeed_')] +
[(self.session.cookies.get('inSpeed_' + x) or 'sg!no!pw') in self.digest for x in ['speedian']])),
failed_msg=(lambda y=None: u'Invalid cookie details for %s. Check settings'))