summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/DepositfilesCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/DepositfilesCom.py')
-rw-r--r--module/plugins/hoster/DepositfilesCom.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py
index 6588a3b37..9d060e75d 100644
--- a/module/plugins/hoster/DepositfilesCom.py
+++ b/module/plugins/hoster/DepositfilesCom.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DepositfilesCom(SimpleHoster):
__name__ = "DepositfilesCom"
__type__ = "hoster"
- __version__ = "0.51"
+ __version__ = "0.52"
__pattern__ = r'https?://(?:www\.)?(depositfiles\.com|dfiles\.(eu|ru))(/\w{1,3})?/files/(?P<ID>\w+)'
@@ -32,14 +32,12 @@ class DepositfilesCom(SimpleHoster):
COOKIES = [("dfiles.eu", "lang_current", "en")]
- FREE_LINK_PATTERN = r'<form id="downloader_file_form" action="(http://.+?\.(dfiles\.eu|depositfiles\.com)/.+?)" method="post"'
- PREMIUM_LINK_PATTERN = r'class="repeat"><a href="(.+?)"'
- PREMIUM_MIRROR_PATTERN = r'class="repeat_mirror"><a href="(.+?)"'
+ LINK_FREE_PATTERN = r'<form id="downloader_file_form" action="(http://.+?\.(dfiles\.eu|depositfiles\.com)/.+?)" method="post"'
+ LINK_PREMIUM_PATTERN = r'class="repeat"><a href="(.+?)"'
+ LINK_MIRROR_PATTERN = r'class="repeat_mirror"><a href="(.+?)"'
- def handleFree(self):
- self.html = self.load(self.pyfile.url, post={"gateway_result": "1"}, cookies=True)
-
+ def handleFree(self, pyfile):
if re.search(r'File is checked, please try again in a minute.', self.html) is not None:
self.logInfo(_("The file is being checked. Waiting 1 minute"))
self.retry(wait_time=60)
@@ -83,7 +81,7 @@ class DepositfilesCom(SimpleHoster):
self.logDebug(params)
continue
- m = re.search(self.FREE_LINK_PATTERN, self.html)
+ m = re.search(self.LINK_FREE_PATTERN, self.html)
if m:
if 'response' in params:
self.correctCaptcha()
@@ -101,7 +99,7 @@ class DepositfilesCom(SimpleHoster):
self.retry(wait_time=60)
- def handlePremium(self):
+ def handlePremium(self, pyfile):
if '<span class="html_download_api-gold_traffic_limit">' in self.html:
self.logWarning(_("Download limit reached"))
self.retry(25, 60 * 60, "Download limit reached")
@@ -109,8 +107,8 @@ class DepositfilesCom(SimpleHoster):
self.account.relogin(self.user)
self.retry()
else:
- link = re.search(self.PREMIUM_LINK_PATTERN, self.html)
- mirror = re.search(self.PREMIUM_MIRROR_PATTERN, self.html)
+ link = re.search(self.LINK_PREMIUM_PATTERN, self.html)
+ mirror = re.search(self.LINK_MIRROR_PATTERN, self.html)
if link:
dlink = link.group(1)
elif mirror: