diff options
Diffstat (limited to 'Plugins')
-rw-r--r-- | Plugins/HoerbuchIn.py | 1 | ||||
-rw-r--r-- | Plugins/MegauploadCom.py | 2 | ||||
-rw-r--r-- | Plugins/Plugin.py | 4 | ||||
-rw-r--r-- | Plugins/RapidshareCom.py | 6 | ||||
-rw-r--r-- | Plugins/YoutubeCom.py | 5 |
5 files changed, 10 insertions, 8 deletions
diff --git a/Plugins/HoerbuchIn.py b/Plugins/HoerbuchIn.py index bf6711461..d318f1927 100644 --- a/Plugins/HoerbuchIn.py +++ b/Plugins/HoerbuchIn.py @@ -34,7 +34,6 @@ class HoerbuchIn(Plugin): tmp = re.findall('<A HREF="(http://www.hoerbuch.in/cj/out.php\?pct=.*?)" TARGET="_blank">Part \d+</A>', download_content) for link in tmp: - i = 0 for i in range(5): link_html = self.req.load(link, cookies=True) link_name = link.split("/")[-1] diff --git a/Plugins/MegauploadCom.py b/Plugins/MegauploadCom.py index 6f5882458..63f033945 100644 --- a/Plugins/MegauploadCom.py +++ b/Plugins/MegauploadCom.py @@ -4,8 +4,6 @@ import os import re import tempfile -from time import time -from time import sleep from Plugin import Plugin diff --git a/Plugins/Plugin.py b/Plugins/Plugin.py index c0724c390..5d7fc8f45 100644 --- a/Plugins/Plugin.py +++ b/Plugins/Plugin.py @@ -18,6 +18,7 @@ # ### import ConfigParser +import logging import re from module.network.Request import Request @@ -43,6 +44,7 @@ class Plugin(): self.want_reconnect = False self.multi_dl = True self.ocr = None #captcha reader instance + self.logger = logging.getLogger("log") def prepare(self, thread): pyfile = self.parent @@ -113,7 +115,7 @@ class Plugin(): self.config[option] = False if self.config[option].lower() == 'false' else self.config[option] def init_ocr(self): - modul = __import__("captcha."+self.props['name'], fromlist=['captcha']) + modul = __import__("captcha." + self.props['name'], fromlist=['captcha']) captchaClass = getattr(modul, self.props['name']) self.ocr = captchaClass() diff --git a/Plugins/RapidshareCom.py b/Plugins/RapidshareCom.py index b07ba31a4..52d731053 100644 --- a/Plugins/RapidshareCom.py +++ b/Plugins/RapidshareCom.py @@ -39,7 +39,7 @@ class RapidshareCom(Plugin): tries = 0 - while not self.start_dl: + while not self.start_dl or not pyfile.status.url: self.req.clear_cookies() @@ -148,8 +148,8 @@ class RapidshareCom(Plugin): self.start_dl = True return re.search(file_url_pattern, self.html[1]).group(1) except Exception, e: - print e, html[1] - return None + self.start_dl = False + return False #print self.html[1] #test print #raise Exception, "Error when retrieving download url" diff --git a/Plugins/YoutubeCom.py b/Plugins/YoutubeCom.py index c780345ee..7428f532d 100644 --- a/Plugins/YoutubeCom.py +++ b/Plugins/YoutubeCom.py @@ -47,7 +47,10 @@ class YoutubeCom(Plugin): file_suffix = ".flv" if self.config['high_quality']: file_suffix = ".mp4" - return re.search(file_name_pattern, self.html).group(1).replace("/", "") + file_suffix + name = re.search(file_name_pattern, self.html).group(1).replace("/", "") + file_suffix + + name = name.replace("&", "&") + return name def file_exists(self): """ returns True or False |