Browse Source

[search engine] Update KickassTorrents

adaptive-webui-19844
ngosang 10 years ago
parent
commit
650e7018a7
  1. 74
      src/searchengine/nova/engines/kickasstorrents.py
  2. 2
      src/searchengine/nova/engines/versions.txt
  3. 74
      src/searchengine/nova3/engines/kickasstorrents.py
  4. 2
      src/searchengine/nova3/engines/versions.txt

74
src/searchengine/nova/engines/kickasstorrents.py

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#VERSION: 1.27
#VERSION: 1.28
#AUTHORS: Christophe Dumez (chris@qbittorrent.org)
#CONTRIBUTORS: Diego de las Heras (diegodelasheras@gmail.com)
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@ -25,48 +26,45 @@ @@ -25,48 +26,45 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
from novaprinter import prettyPrinter
from helpers import retrieve_url, download_file
import json
class kickasstorrents(object):
url = 'https://kat.cr'
name = 'Kickass Torrents'
supported_categories = {'all': '', 'movies': 'Movies', 'tv': 'TV', 'music': 'Music', 'games': 'Games', 'software': 'Applications'}
def __init__(self):
self.results = []
url = 'https://kat.cr'
name = 'Kickass Torrents'
supported_categories = {'all': '', 'movies': 'Movies', 'tv': 'TV', 'music': 'Music', 'games': 'Games', 'software': 'Applications'}
def download_torrent(self, info):
print download_file(info, info)
def __init__(self):
pass
def search(self, what, cat='all'):
ret = []
i = 1
while True and i<11:
results = []
json_data = retrieve_url(self.url+'/json.php?q=%s&page=%d'%(what, i))
try:
json_dict = json.loads(json_data)
except:
i += 1
continue
if int(json_dict['total_results']) <= 0: return
results = json_dict['list']
for r in results:
try:
if cat != 'all' and self.supported_categories[cat] != r['category']: continue
res_dict = dict()
res_dict['name'] = r['title']
res_dict['size'] = str(r['size'])
res_dict['seeds'] = r['seeds']
res_dict['leech'] = r['leechs']
res_dict['link'] = r['torrentLink']
res_dict['desc_link'] = r['link']
res_dict['engine_url'] = self.url
prettyPrinter(res_dict)
except:
pass
i += 1
def download_torrent(self, info):
print download_file(info, info)
def search(self, what, cat='all'):
i = 1
while True and i < 11:
json_data = retrieve_url(self.url+'/json.php?q=%s&page=%d'%(what, i))
try:
json_dict = json.loads(json_data)
except:
i += 1
continue
if int(json_dict['total_results']) <= 0:
return
for r in json_dict['list']:
try:
if cat != 'all' and self.supported_categories[cat] != r['category']:
continue
res_dict = dict()
res_dict['name'] = r['title']
res_dict['size'] = str(r['size'])
res_dict['seeds'] = r['seeds']
res_dict['leech'] = r['leechs']
res_dict['link'] = r['torrentLink']
res_dict['desc_link'] = r['link'].replace('http://', 'https://')
res_dict['engine_url'] = self.url
prettyPrinter(res_dict)
except:
pass
i += 1

2
src/searchengine/nova/engines/versions.txt

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
btdigg: 1.25
demonoid: 1.1
extratorrent: 2.0
kickasstorrents: 1.27
kickasstorrents: 1.28
legittorrents: 2.00
mininova: 2.00
piratebay: 2.11

74
src/searchengine/nova3/engines/kickasstorrents.py

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#VERSION: 1.27
#VERSION: 1.28
#AUTHORS: Christophe Dumez (chris@qbittorrent.org)
#CONTRIBUTORS: Diego de las Heras (diegodelasheras@gmail.com)
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@ -25,48 +26,45 @@ @@ -25,48 +26,45 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
from novaprinter import prettyPrinter
from helpers import retrieve_url, download_file
import json
class kickasstorrents(object):
url = 'https://kat.cr'
name = 'Kickass Torrents'
supported_categories = {'all': '', 'movies': 'Movies', 'tv': 'TV', 'music': 'Music', 'games': 'Games', 'software': 'Applications'}
def __init__(self):
self.results = []
url = 'https://kat.cr'
name = 'Kickass Torrents'
supported_categories = {'all': '', 'movies': 'Movies', 'tv': 'TV', 'music': 'Music', 'games': 'Games', 'software': 'Applications'}
def download_torrent(self, info):
print(download_file(info, info))
def __init__(self):
pass
def search(self, what, cat='all'):
ret = []
i = 1
while True and i<11:
results = []
json_data = retrieve_url(self.url+'/json.php?q=%s&page=%d'%(what, i))
try:
json_dict = json.loads(json_data)
except:
i += 1
continue
if int(json_dict['total_results']) <= 0: return
results = json_dict['list']
for r in results:
try:
if cat != 'all' and self.supported_categories[cat] != r['category']: continue
res_dict = dict()
res_dict['name'] = r['title']
res_dict['size'] = str(r['size'])
res_dict['seeds'] = r['seeds']
res_dict['leech'] = r['leechs']
res_dict['link'] = r['torrentLink']
res_dict['desc_link'] = r['link']
res_dict['engine_url'] = self.url
prettyPrinter(res_dict)
except:
pass
i += 1
def download_torrent(self, info):
print(download_file(info, info))
def search(self, what, cat='all'):
i = 1
while True and i < 11:
json_data = retrieve_url(self.url+'/json.php?q=%s&page=%d'%(what, i))
try:
json_dict = json.loads(json_data)
except:
i += 1
continue
if int(json_dict['total_results']) <= 0:
return
for r in json_dict['list']:
try:
if cat != 'all' and self.supported_categories[cat] != r['category']:
continue
res_dict = dict()
res_dict['name'] = r['title']
res_dict['size'] = str(r['size'])
res_dict['seeds'] = r['seeds']
res_dict['leech'] = r['leechs']
res_dict['link'] = r['torrentLink']
res_dict['desc_link'] = r['link'].replace('http://', 'https://')
res_dict['engine_url'] = self.url
prettyPrinter(res_dict)
except:
pass
i += 1

2
src/searchengine/nova3/engines/versions.txt

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
btdigg: 1.25
demonoid: 1.1
extratorrent: 2.0
kickasstorrents: 1.27
kickasstorrents: 1.28
legittorrents: 2.00
mininova: 2.00
piratebay: 2.11

Loading…
Cancel
Save