summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/TurbobitNet.py
diff options
context:
space:
mode:
authorGravatar Sahil Shekhawat <sahilshekhawat01@gmail.com> 2015-01-11 14:54:48 +0100
committerGravatar Sahil Shekhawat <sahilshekhawat01@gmail.com> 2015-01-11 14:54:48 +0100
commitd2b60b5ceb369814a0de41c8b8744b5c4ed81523 (patch)
tree6619e01fc0e5f281e4d28678ec565860a86784ec /module/plugins/hoster/TurbobitNet.py
parentupdated nitroflare.com's plugin (diff)
parentCode improvements (diff)
downloadpyload-d2b60b5ceb369814a0de41c8b8744b5c4ed81523.tar.xz
Merged with the updated nitroflare
Diffstat (limited to 'module/plugins/hoster/TurbobitNet.py')
-rw-r--r--module/plugins/hoster/TurbobitNet.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py
index 258ec7d3e..ccca76018 100644
--- a/module/plugins/hoster/TurbobitNet.py
+++ b/module/plugins/hoster/TurbobitNet.py
@@ -17,7 +17,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, t
class TurbobitNet(SimpleHoster):
__name__ = "TurbobitNet"
__type__ = "hoster"
- __version__ = "0.16"
+ __version__ = "0.17"
__pattern__ = r'http://(?:www\.)?turbobit\.net/(?:download/free/)?(?P<ID>\w+)'
@@ -36,24 +36,28 @@ class TurbobitNet(SimpleHoster):
OFFLINE_PATTERN = r'<h2>File Not Found</h2>|html\(\'File (?:was )?not found'
LINK_PATTERN = r'(/download/redirect/[^"\']+)'
- LIMIT_WAIT_PATTERN = r'<div id=\'timeout\'>(\d+)<'
- CAPTCHA_PATTERN = r'<img alt="Captcha" src="(.+?)"'
+ LIMIT_WAIT_PATTERN = r'<div id=\'timeout\'>(\d+)<'
+ CAPTCHA_PATTERN = r'<img alt="Captcha" src="(.+?)"'
- def handleFree(self):
+ def handleFree(self, pyfile):
self.url = "http://turbobit.net/download/free/%s" % self.info['pattern']['ID']
self.html = self.load(self.url, ref=True, decode=True)
rtUpdate = self.getRtUpdate()
self.solveCaptcha()
+
self.req.http.c.setopt(HTTPHEADER, ["X-Requested-With: XMLHttpRequest"])
+
self.url = self.getDownloadUrl(rtUpdate)
self.wait()
self.html = self.load(self.url)
+
self.req.http.c.setopt(HTTPHEADER, ["X-Requested-With:"])
+
self.downloadFile()
@@ -157,7 +161,7 @@ class TurbobitNet(SimpleHoster):
return "%s GMT%+03d%02d" % (time.strftime("%a %b %d %Y %H:%M:%S", lt), -tz // 3600, tz % 3600)
- def handlePremium(self):
+ def handlePremium(self, pyfile):
self.logDebug("Premium download as user %s" % self.user)
self.downloadFile()