|
|
@ -1,4 +1,4 @@ |
|
|
|
#VERSION: 2.11 |
|
|
|
#VERSION: 2.20 |
|
|
|
#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 |
|
|
@ -34,6 +34,7 @@ import re |
|
|
|
class btjunkie(object): |
|
|
|
class btjunkie(object): |
|
|
|
url = 'http://btjunkie.org' |
|
|
|
url = 'http://btjunkie.org' |
|
|
|
name = 'btjunkie' |
|
|
|
name = 'btjunkie' |
|
|
|
|
|
|
|
supported_categories = {'all': '0', 'movies': '6', 'tv': '4', 'music': '1', 'games': '2', 'anime': '7', 'software': '3'} |
|
|
|
|
|
|
|
|
|
|
|
def __init__(self): |
|
|
|
def __init__(self): |
|
|
|
self.results = [] |
|
|
|
self.results = [] |
|
|
@ -91,13 +92,13 @@ class btjunkie(object): |
|
|
|
prettyPrinter(self.current_item) |
|
|
|
prettyPrinter(self.current_item) |
|
|
|
self.results.append('a') |
|
|
|
self.results.append('a') |
|
|
|
|
|
|
|
|
|
|
|
def search(self, what): |
|
|
|
def search(self, what, cat='all'): |
|
|
|
ret = [] |
|
|
|
ret = [] |
|
|
|
i = 1 |
|
|
|
i = 1 |
|
|
|
while True and i<11: |
|
|
|
while True and i<11: |
|
|
|
results = [] |
|
|
|
results = [] |
|
|
|
parser = self.SimpleSGMLParser(results, self.url) |
|
|
|
parser = self.SimpleSGMLParser(results, self.url) |
|
|
|
dat = retrieve_url(self.url+'/search?q=%s&o=52&p=%d'%(what,i)) |
|
|
|
dat = retrieve_url(self.url+'/search?q=%s&c=%s&o=52&p=%d'%(what, cat, i)) |
|
|
|
# Remove <font> tags from page |
|
|
|
# Remove <font> tags from page |
|
|
|
p = re.compile( '<[/]?font.*?>') |
|
|
|
p = re.compile( '<[/]?font.*?>') |
|
|
|
dat = p.sub('', dat) |
|
|
|
dat = p.sub('', dat) |
|
|
|