Browse Source

PassThePopcorn URL update to prevent API 403 error

PassThePopcorn recently changed their api endpoints to tls.passthepopcorn.me to passthepopcorn.me . Unless you change these URLs, you get this issue:

```
12-05 05:08:17 ERROR
[hpotato.core.plugins.base] Failed opening url in PassThePopcorn: https://tls.passthepopcorn.me/ajax.php?action=login Traceback (most recent call last): HTTPError: 403 Client Error: Forbidden for url: https://passthepopcorn.me/ajax.php?action=login
12-05 05:08:17 ERROR
[edia._base.providers.base] Failed to login PassThePopcorn: Traceback (most recent call last): File "/home/couchpotato/CouchPotatoServer/couchpotato/core/media/_base/providers/base.py", line 163, in login output = self.urlopen(self.urls['login'], data = self.getLoginParams()) File "/home/couchpotato/CouchPotatoServer/couchpotato/core/plugins/base.py", line 227, in urlopen response.raise_for_status() File "/home/couchpotato/CouchPotatoServer/libs/requests/models.py", line 837, in raise_for_status raise HTTPError(http_error_msg, response=self) HTTPError: 403 Client Error: Forbidden for url: https://passthepopcorn.me/ajax.php?action=login```

There is a thread at their forum; titled: "HTTPS Migration preventing CouchPotato Login", and it's told that this patch fixes this issue. This is required due to migration and their tracker update, and it is shared there. So all credits to the poster. I'm simply making a pull request for the fix, and further investigation if required.

Thanks in advance,
pull/7138/head
lattedesu 9 years ago
committed by GitHub
parent
commit
78a4749952
  1. 14
      couchpotato/core/media/_base/providers/torrent/passthepopcorn.py

14
couchpotato/core/media/_base/providers/torrent/passthepopcorn.py

@ -18,12 +18,12 @@ log = CPLog(__name__)
class Base(TorrentProvider):
urls = {
'domain': 'https://tls.passthepopcorn.me',
'detail': 'https://tls.passthepopcorn.me/torrents.php?torrentid=%s',
'torrent': 'https://tls.passthepopcorn.me/torrents.php',
'login': 'https://tls.passthepopcorn.me/ajax.php?action=login',
'login_check': 'https://tls.passthepopcorn.me/ajax.php?action=login',
'search': 'https://tls.passthepopcorn.me/search/%s/0/7/%d'
'domain': 'https://passthepopcorn.me',
'detail': 'https://passthepopcorn.me/torrents.php?torrentid=%s',
'torrent': 'https://passthepopcorn.me/torrents.php',
'login': 'https://passthepopcorn.me/ajax.php?action=login',
'login_check': 'https://passthepopcorn.me/ajax.php?action=login',
'search': 'https://passthepopcorn.me/search/%s/0/7/%d'
}
login_errors = 0
@ -218,7 +218,7 @@ config = [{
'name': 'domain',
'advanced': True,
'label': 'Proxy server',
'description': 'Domain for requests (HTTPS only!), keep empty to use default (tls.passthepopcorn.me).',
'description': 'Domain for requests (HTTPS only!), keep empty to use default (passthepopcorn.me).',
},
{
'name': 'username',

Loading…
Cancel
Save