summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Nitzo <nitzo2001@yahoo.com> 2016-04-09 23:14:40 +0200
committerGravatar Nitzo <nitzo2001@yahoo.com> 2016-04-09 23:14:40 +0200
commitf5c648f6161ee4075b1b4075be0f4644a94915d6 (patch)
tree945e4ffe58518bb5669d1b29011f7a339eda84c6 /module
parent[NitroflareCom] Update TRAFFIC_LEFT_PATTERN (diff)
downloadpyload-f5c648f6161ee4075b1b4075be0f4644a94915d6.tar.xz
[NitroflareCom] Update
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hoster/NitroflareCom.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/module/plugins/hoster/NitroflareCom.py b/module/plugins/hoster/NitroflareCom.py
index 3e2970985..68bb3bf04 100644
--- a/module/plugins/hoster/NitroflareCom.py
+++ b/module/plugins/hoster/NitroflareCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster
class NitroflareCom(SimpleHoster):
__name__ = "NitroflareCom"
__type__ = "hoster"
- __version__ = "0.19"
+ __version__ = "0.20"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?nitroflare\.com/view/(?P<ID>[\w^_]+)'
@@ -39,18 +39,20 @@ class NitroflareCom(SimpleHoster):
def handle_free(self, pyfile):
#: Used here to load the cookies which will be required later
+ self.load("http://nitroflare.com/ajax/setCookie.php", post={'fileId': self.info['pattern']['ID']})
+
self.load(pyfile.url, post={'goToFreePage': ""})
- self.load("http://nitroflare.com/ajax/setCookie.php", post={'fileId': self.info['pattern']['ID']})
self.data = self.load("http://nitroflare.com/ajax/freeDownload.php",
- post={'method': "startTimer", 'fileId': self.info['pattern']['ID']})
+ post={'method': "startTimer",
+ 'fileId': self.info['pattern']['ID']})
self.check_errors()
try:
js_file = self.load("http://nitroflare.com/js/downloadFree.js?v=1.0.1")
- var_time = re.search("var time = (\\d+);", js_file)
- wait_time = int(var_time.groups()[0])
+ var_time = re.search(r'var time = (\d+);', js_file).group(1)
+ wait_time = int(var_time)
except Exception:
wait_time = 60
@@ -65,4 +67,7 @@ class NitroflareCom(SimpleHoster):
'recaptcha_challenge_field': challenge,
'recaptcha_response_field' : response})
+ if "The captcha wasn't entered correctly" in self.data:
+ self.retry_captcha()
+
return super(NitroflareCom, self).handle_free(pyfile)