From b849139d38d9cebd367879d9a3323dfde733e866 Mon Sep 17 00:00:00 2001 From: Sleeper Date: Mon, 12 Apr 2010 21:51:44 +0200 Subject: fix netload and shareonline, captcha subsets for better recognition --- module/plugins/hoster/NetloadIn.py | 10 +++++++--- module/plugins/hoster/ShareonlineBiz.py | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index 0b7bcd27f..9891828a2 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -57,6 +57,7 @@ class NetloadIn(Plugin): thread.wait(self.parent) pyfile.status.url = self.get_file_url() + return True else: return False @@ -69,7 +70,10 @@ class NetloadIn(Plugin): apiurl = "http://netload.in/share/fileinfos2.php" src = self.req.load(apiurl, cookies=False, get={"file_id": match.group(1)}) self.api_data = {} - if not src == "unknown file_data": + if src == "unknown_server_data": + self.api_data = False + self.html[0] = self.req.load(self.parent.url, cookies=False) + elif not src == "unknown file_data": lines = src.split(";") self.api_data["exists"] = True self.api_data["fileid"] = lines[0] @@ -124,7 +128,7 @@ class NetloadIn(Plugin): self.time_plus_wait = time() + wait_seconds def get_file_name(self): - if self.api_data["filename"]: + if self.api_data and self.api_data["filename"]: return self.api_data["filename"] elif self.html[0]: file_name_pattern = '\t\t\t(.+)' @@ -134,7 +138,7 @@ class NetloadIn(Plugin): return self.parent.url def file_exists(self): - if self.api_data["exists"]: + if self.api_data and self.api_data["exists"]: return self.api_data["exists"] elif self.html[0] and re.search(r"The file has been deleted", self.html[0]) == None: return True diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index ede810bbd..b76e83568 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -46,6 +46,7 @@ class ShareonlineBiz(Plugin): pyfile.status.waituntil = self.time_plus_wait pyfile.status.url = self.get_file_url() pyfile.status.want_reconnect = self.want_reconnect + return True else: return False -- cgit v1.2.3