diff --git a/src/search_engine/engines/isohunt.py b/src/search_engine/engines/isohunt.py index a02d306f8..90da20406 100644 --- a/src/search_engine/engines/isohunt.py +++ b/src/search_engine/engines/isohunt.py @@ -1,4 +1,4 @@ -#VERSION: 1.1 +#VERSION: 1.2 #AUTHORS: Christophe Dumez (chris@qbittorrent.org) # Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ from novaprinter import prettyPrinter import re -import urllib +from helpers import retrieve_url class isohunt(object): url = 'http://isohunt.com' @@ -37,7 +37,7 @@ class isohunt(object): i = 1 while True and i<11: res = 0 - dat = urllib.urlopen(self.url+'/torrents.php?ihq=%s&ihp=%s&ihs1=2&iho1=d'%(what,i)).read().decode('utf8', 'replace') + dat = retrieve_url(self.url+'/torrents.php?ihq=%s&ihp=%s&ihs1=2&iho1=d'%(what,i)) # I know it's not very readable, but the SGML parser feels in pain section_re = re.compile('(?s)id=link.*?.*?[^/]+).*?' diff --git a/src/search_engine/engines/mininova.py b/src/search_engine/engines/mininova.py index 400b155cd..7f19b559a 100644 --- a/src/search_engine/engines/mininova.py +++ b/src/search_engine/engines/mininova.py @@ -1,4 +1,4 @@ -#VERSION: 1.2 +#VERSION: 1.21 #AUTHORS: Fabien Devaux (fab@gnux.info) # Redistribution and use in source and binary forms, with or without @@ -64,14 +64,12 @@ class mininova(object): return ''.join([ get_text(n) for n in txt.childNodes]) page = 1 while True and page<11: - file = open('/home/chris/mytest.txt', 'w') - file.write(self.url+'/search/%s/seeds/%d'%(what, page)) - file.close() res = 0 dat = retrieve_url(self.url+'/search/%s/seeds/%d'%(what, page)) dat = re.sub("