diff options
author | Sleeper <devnull@localhost> | 2010-04-12 21:51:44 +0200 |
---|---|---|
committer | Sleeper <devnull@localhost> | 2010-04-12 21:51:44 +0200 |
commit | b849139d38d9cebd367879d9a3323dfde733e866 (patch) | |
tree | 5c3e609bb343e92a421cfc5725ca1df0f55401b3 /module/plugins/hoster | |
parent | set_conf fix (diff) | |
download | pyload-b849139d38d9cebd367879d9a3323dfde733e866.tar.xz |
fix netload and shareonline, captcha subsets for better recognition
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/NetloadIn.py | 10 | ||||
-rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 1 |
2 files changed, 8 insertions, 3 deletions
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(.+)<span style="color: #8d8d8d;">' @@ -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 |