diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-09 00:26:28 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-09 00:26:28 +0200 |
commit | c67b08d1493c56a8dbf9e560f6f36c6c987197a7 (patch) | |
tree | 1d88b7cd197bec792231151960b98d24ea77c064 /module/plugins | |
parent | unrar fix (diff) | |
download | pyload-c67b08d1493c56a8dbf9e560f6f36c6c987197a7.tar.xz |
netload fix
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/hoster/NetloadIn.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index 2c9a02964..f0f3db5cf 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- import re -from time import sleep +from time import sleep, time from module.plugins.Hoster import Hoster @@ -134,6 +134,7 @@ class NetloadIn(Hoster): def download_html(self): self.log.debug("Netload: Entering download_html") page = self.load(self.url) + t = time() + 30 if not self.api_data: self.log.debug("API Data may be useless, get details from html page") @@ -175,21 +176,26 @@ class NetloadIn(Hoster): try: url_captcha_html = "http://netload.in/" + re.search('(index.php\?id=10&.*&captcha=1)', page).group(1).replace("amp;", "") + except: + page = None + continue + + try: page = self.load(url_captcha_html, cookies=True) captcha_url = "http://netload.in/" + re.search('(share/includes/captcha.php\?t=\d*)', page).group(1) except: open("dump.html", "w").write(page) self.log.debug("Netload: Could not find captcha, try again from beginning") captchawaited = False - page = False continue file_id = re.search('<input name="file_id" type="hidden" value="(.*)" />', page).group(1) if not captchawaited: wait = self.get_wait_time(page) if i == 0: wait = 1 # wait only 1 sec contrary to time on website - self.log.info(_("Netload: waiting for captcha %d s." % wait)) - self.setWait(wait) + else: self.waitUntil = time + self.log.info(_("Netload: waiting for captcha %d s." % t - time())) + #self.setWait(wait) self.wait() captchawaited = True |