summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/ExtabitCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/ExtabitCom.py')
-rw-r--r--module/plugins/hoster/ExtabitCom.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py
index ead2e1e53..c2ae32099 100644
--- a/module/plugins/hoster/ExtabitCom.py
+++ b/module/plugins/hoster/ExtabitCom.py
@@ -5,13 +5,13 @@ import re
from module.common.json_layer import json_loads
from module.plugins.internal.ReCaptcha import ReCaptcha
-from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, secondsToMidnight
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, seconds_to_midnight
class ExtabitCom(SimpleHoster):
__name__ = "ExtabitCom"
__type__ = "hoster"
- __version__ = "0.66"
+ __version__ = "0.67"
__pattern__ = r'http://(?:www\.)?extabit\.com/(file|go|fid)/(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -29,7 +29,7 @@ class ExtabitCom(SimpleHoster):
LINK_FREE_PATTERN = r'[\'"](http://guest\d+\.extabit\.com/\w+/.*?)[\'"]'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
if r">Only premium users can download this file" in self.html:
self.fail(_("Only premium users can download this file"))
@@ -37,10 +37,10 @@ class ExtabitCom(SimpleHoster):
if m:
self.wait(int(m.group(1)) * 60, True)
elif "The daily downloads limit from your IP is exceeded" in self.html:
- self.logWarning(_("You have reached your daily downloads limit for today"))
- self.wait(secondsToMidnight(gmt=2), True)
+ self.log_warning(_("You have reached your daily downloads limit for today"))
+ self.wait(seconds_to_midnight(gmt=2), True)
- self.logDebug("URL: " + self.req.http.lastEffectiveURL)
+ self.log_debug("URL: " + self.req.http.lastEffectiveURL)
m = re.match(self.__pattern__, self.req.http.lastEffectiveURL)
fileID = m.group('ID') if m else self.info['pattern']['ID']
@@ -54,10 +54,10 @@ class ExtabitCom(SimpleHoster):
get_data['capture'], get_data['challenge'] = recaptcha.challenge(captcha_key)
res = json_loads(self.load("http://extabit.com/file/%s/" % fileID, get=get_data))
if "ok" in res:
- self.correctCaptcha()
+ self.correct_captcha()
break
else:
- self.invalidCaptcha()
+ self.invalid_captcha()
else:
self.fail(_("Invalid captcha"))
else: