mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
- Category support for isohunt engine
This commit is contained in:
parent
941d9b9bd9
commit
3fa14cd47f
2 changed files with 5 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
#VERSION: 1.21
|
#VERSION: 1.30
|
||||||
#AUTHORS: Christophe Dumez (chris@qbittorrent.org)
|
#AUTHORS: Christophe Dumez (chris@qbittorrent.org)
|
||||||
|
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -32,15 +32,16 @@ from helpers import retrieve_url, download_file
|
||||||
class isohunt(object):
|
class isohunt(object):
|
||||||
url = 'http://isohunt.com'
|
url = 'http://isohunt.com'
|
||||||
name = 'isoHunt'
|
name = 'isoHunt'
|
||||||
|
supported_categories = {'all': '', 'movies': '1', 'tv': '3', 'music': '2', 'games': '4', 'anime': '7', 'software': '5', 'pictures': '6', 'books': '9'}
|
||||||
|
|
||||||
def download_torrent(self, info):
|
def download_torrent(self, info):
|
||||||
print download_file(info)
|
print download_file(info)
|
||||||
|
|
||||||
def search(self, what):
|
def search(self, what, cat='all'):
|
||||||
i = 1
|
i = 1
|
||||||
while True and i<11:
|
while True and i<11:
|
||||||
res = 0
|
res = 0
|
||||||
dat = retrieve_url(self.url+'/torrents.php?ihq=%s&ihp=%s&ihs1=2&iho1=d'%(what,i))
|
dat = retrieve_url(self.url+'/torrents.php?ihq=%s&iht=%s&ihp=%s&ihs1=2&iho1=d'%(what, self.supported_categories[cat],i))
|
||||||
# I know it's not very readable, but the SGML parser feels in pain
|
# I know it's not very readable, but the SGML parser feels in pain
|
||||||
section_re = re.compile('(?s)id=link.*?</tr><tr')
|
section_re = re.compile('(?s)id=link.*?</tr><tr')
|
||||||
torrent_re = re.compile('(?s)torrent_details/(?P<link>.*?[^/]+).*?'
|
torrent_re = re.compile('(?s)torrent_details/(?P<link>.*?[^/]+).*?'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
isohunt: 1.21
|
isohunt: 1.30
|
||||||
torrentreactor: 1.11
|
torrentreactor: 1.11
|
||||||
btjunkie: 2.21
|
btjunkie: 2.21
|
||||||
mininova: 1.31
|
mininova: 1.31
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue