Fix RarBG description link. Thanks #85 (#86)

This commit is contained in:
Diego Heras 2019-04-27 16:05:15 +02:00 committed by GitHub
parent 8c1932330a
commit 22320b82f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 8 deletions

View File

@ -1,4 +1,4 @@
#VERSION: 2.00
#VERSION: 2.10
# AUTHORS: b0nk
# CONTRIBUTORS: Diego de las Heras (ngosang@hotmail.es)
@ -52,9 +52,10 @@ class rarbg(object):
def search(self, what, cat='all'):
base_url = "https://torrentapi.org/pubapi_v2.php?%s"
app_id = "qbittorrent"
# get token
params = urlencode({'get_token': 'get_token', 'app_id': 'qbittorrent'})
params = urlencode({'get_token': 'get_token', 'app_id': app_id})
response = retrieve_url(base_url % params)
j = json.loads(response)
token = j['token']
@ -83,5 +84,5 @@ class rarbg(object):
'seeds': result['seeders'],
'leech': result['leechers'],
'engine_url': self.url,
'desc_link': result['info_page']}
'desc_link': result['info_page'] + "&app_id=" + app_id}
prettyPrinter(res)

View File

@ -4,6 +4,6 @@ leetx: 2.00
legittorrents: 2.03
limetorrents: 4.01
piratebay: 2.18
rarbg: 2.00
rarbg: 2.10
torlock: 2.1
zooqle: 1.13

View File

@ -1,4 +1,4 @@
#VERSION: 2.00
#VERSION: 2.10
# AUTHORS: b0nk
# CONTRIBUTORS: Diego de las Heras (ngosang@hotmail.es)
@ -52,9 +52,10 @@ class rarbg(object):
def search(self, what, cat='all'):
base_url = "https://torrentapi.org/pubapi_v2.php?%s"
app_id = "qbittorrent"
# get token
params = urlencode({'get_token': 'get_token', 'app_id': 'qbittorrent'})
params = urlencode({'get_token': 'get_token', 'app_id': app_id})
response = retrieve_url(base_url % params)
j = json.loads(response)
token = j['token']
@ -83,5 +84,5 @@ class rarbg(object):
'seeds': result['seeders'],
'leech': result['leechers'],
'engine_url': self.url,
'desc_link': result['info_page']}
'desc_link': result['info_page'] + "&app_id=" + app_id}
prettyPrinter(res)

View File

@ -4,6 +4,6 @@ leetx: 2.00
legittorrents: 2.03
limetorrents: 4.01
piratebay: 2.18
rarbg: 2.00
rarbg: 2.10
torlock: 2.1
zooqle: 1.13