summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/UploadheroCom.py
diff options
context:
space:
mode:
authorGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
committerGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
commitb0ef3f1673e1930916604bb1264ca3a38414bc8d (patch)
treec97936e4d2a4cd6eb1072c65c8a08a7d18816b18 /module/plugins/hoster/UploadheroCom.py
parent[XFileSharingPro][XFileSharingProFolder] Added default __pattern__ (diff)
parentFix https://github.com/pyload/pyload/issues/1707 (diff)
downloadpyload-b0ef3f1673e1930916604bb1264ca3a38414bc8d.tar.xz
Merge pull request #1 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/hoster/UploadheroCom.py')
-rw-r--r--module/plugins/hoster/UploadheroCom.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py
index 5c74f10eb..2af0f32fc 100644
--- a/module/plugins/hoster/UploadheroCom.py
+++ b/module/plugins/hoster/UploadheroCom.py
@@ -12,7 +12,8 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UploadheroCom(SimpleHoster):
__name__ = "UploadheroCom"
__type__ = "hoster"
- __version__ = "0.18"
+ __version__ = "0.19"
+ __status__ = "testing"
__pattern__ = r'http://(?:www\.)?uploadhero\.com?/dl/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -38,15 +39,15 @@ class UploadheroCom(SimpleHoster):
LINK_PREMIUM_PATTERN = r'<a href="(.+?)" id="downloadnow"'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search(self.CAPTCHA_PATTERN, self.html)
if m is None:
self.error(_("Captcha not found"))
- captcha = self.decryptCaptcha(urlparse.urljoin("http://uploadhero.co", m.group(1)))
+ captcha = self.captcha.decrypt(urlparse.urljoin("http://uploadhero.co", m.group(1)))
self.html = self.load(pyfile.url,
- get={"code": captcha})
+ get={'code': captcha})
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m:
@@ -54,7 +55,7 @@ class UploadheroCom(SimpleHoster):
self.wait(50)
- def checkErrors(self):
+ def check_errors(self):
m = re.search(self.IP_BLOCKED_PATTERN, self.html)
if m:
self.html = self.load(urlparse.urljoin("http://uploadhero.co", m.group(1)))
@@ -64,7 +65,7 @@ class UploadheroCom(SimpleHoster):
self.wait(wait_time, True)
self.retry()
- return super(UploadheroCom, self).checkErrors()
+ return super(UploadheroCom, self).check_errors()
getInfo = create_getInfo(UploadheroCom)