From 1b4bb7655f710c0a52deaeb36ffc60e20f5fae3f Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 30 Nov 2007 11:55:50 +0000 Subject: [PATCH] limit search engine plugins to 10 result pages --- TODO | 2 +- src/search_engine/engines/btjunkie.py | 6 +++--- src/search_engine/engines/isohunt.py | 6 +++--- src/search_engine/engines/mininova.py | 4 ++-- src/search_engine/engines/piratebay.py | 6 +++--- src/search_engine/engines/torrentreactor.py | 6 +++--- src/search_engine/engines/versions.txt | 10 +++++----- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/TODO b/TODO index fac98b156..5affcbfc6 100644 --- a/TODO +++ b/TODO @@ -29,7 +29,6 @@ - Allow user to organize the downloads into categories/folders? // in v1.1.0 -<<<<<<< .courant - Tabs support in search - Allow to hide columns? - Allow to scan multiple directories? (useful?) @@ -58,4 +57,5 @@ rc9->rc10 changelog: - FEATURE: Greatly improved ETA calculation algorithm (use GASA) - BUGFIX: Fixed proxy host max length in preferences - BUGFIX: Added a 3 minutes search engine timeout +- BUGFIX: Limit search engine plugins to 10 result pages - COSMETIC: Use more skin colors instead of hard coded ones diff --git a/src/search_engine/engines/btjunkie.py b/src/search_engine/engines/btjunkie.py index 67e2da817..11b5f63fc 100644 --- a/src/search_engine/engines/btjunkie.py +++ b/src/search_engine/engines/btjunkie.py @@ -1,4 +1,4 @@ -#VERSION: 1.10 +#VERSION: 1.11 #AUTHORS: Fabien Devaux (fab@gnux.info) from novaprinter import prettyPrinter import urllib @@ -10,7 +10,7 @@ class btjunkie(object): def search(self, what): i = 1 - while True: + while True and i<11: res = 0 dat = urllib.urlopen(self.url+'/search?q=%s&o=52&p=%d'%(what,i)).read().decode('utf8', 'replace') # I know it's not very readable, but the SGML parser feels in pain @@ -32,4 +32,4 @@ class btjunkie(object): res = res + 1 if res == 0: break - i = i + 1 \ No newline at end of file + i = i + 1 diff --git a/src/search_engine/engines/isohunt.py b/src/search_engine/engines/isohunt.py index 12f1b2619..8548f0808 100644 --- a/src/search_engine/engines/isohunt.py +++ b/src/search_engine/engines/isohunt.py @@ -1,4 +1,4 @@ -#VERSION: 1.00 +#VERSION: 1.01 #AUTHORS: Gekko Dam Beer (gekko04@users.sourceforge.net) from novaprinter import prettyPrinter import sgmllib @@ -67,7 +67,7 @@ class isohunt(object): def search(self, what): i = 1 - while True: + while True and i<11: results = [] parser = self.SimpleSGMLParser(results, self.url) dat = urllib.urlopen(self.url+'/torrents.php?ihq=%s&ihp=%s'%(what,i)).read().decode('utf-8', 'replace') @@ -75,4 +75,4 @@ class isohunt(object): parser.close() if len(results) <= 0: break - i += 1 \ No newline at end of file + i += 1 diff --git a/src/search_engine/engines/mininova.py b/src/search_engine/engines/mininova.py index dca2b4d31..1f5e6f143 100644 --- a/src/search_engine/engines/mininova.py +++ b/src/search_engine/engines/mininova.py @@ -1,4 +1,4 @@ -#VERSION: 1.11 +#VERSION: 1.12 #AUTHORS: Fabien Devaux (fab@gnux.info) from novaprinter import prettyPrinter import urllib @@ -29,7 +29,7 @@ class mininova(object): else: return ''.join([ get_text(n) for n in txt.childNodes]) page = 1 - while True: + while True and page<11: res = 0 dat = urllib.urlopen(self.url+'/search/%s/seeds/%d'%(what, page)).read().decode('utf-8', 'replace') dat = re.sub("