summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Plugins/NetloadIn.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Plugins/NetloadIn.py b/Plugins/NetloadIn.py
index 9509796f4..733347272 100644
--- a/Plugins/NetloadIn.py
+++ b/Plugins/NetloadIn.py
@@ -73,7 +73,14 @@ class NetloadIn(Plugin):
def download_html2(self):
url_captcha_html = "http://netload.in/" + re.search('(index.php\?id=10&.*&captcha=1)', self.html[0]).group(1).replace("amp;", "")
self.html[1] = self.req.load(url_captcha_html, cookies=True)
- captcha_url = "http://netload.in/" + re.search('(share/includes/captcha.php\?t=\d*)', self.html[1]).group(1)
+
+ try:
+ captcha_url = "http://netload.in/" + re.search('(share/includes/captcha.php\?t=\d*)', self.html[1]).group(1)
+ except:
+ url_captcha_html = "http://netload.in/" + re.search('(index.php\?id=10&.*&captcha=1)', self.html[1]).group(1).replace("amp;", "")
+ self.html[1] = self.req.load(url_captcha_html, cookies=True)
+ captcha_url = "http://netload.in/" + re.search('(share/includes/captcha.php\?t=\d*)', self.html[1]).group(1)
+
file_id = re.search('<input name="file_id" type="hidden" value="(.*)" />', self.html[1]).group(1)
captcha_image = tempfile.NamedTemporaryFile(suffix=".png").name