summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/hoster/UlozTo.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugin/hoster/UlozTo.py')
-rw-r--r--pyload/plugin/hoster/UlozTo.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/pyload/plugin/hoster/UlozTo.py b/pyload/plugin/hoster/UlozTo.py
index 0e4156ad0..fbbe21f3e 100644
--- a/pyload/plugin/hoster/UlozTo.py
+++ b/pyload/plugin/hoster/UlozTo.py
@@ -18,6 +18,7 @@ class UlozTo(SimpleHoster):
__version__ = "1.04"
__pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(?:live/)?(?P<ID>\w+/[^/?]*)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Uloz.to hoster plugin"""
__license__ = "GPLv3"
@@ -46,7 +47,7 @@ class UlozTo(SimpleHoster):
def process(self, pyfile):
pyfile.url = re.sub(r"(?<=http://)([^/]+)", "www.ulozto.net", pyfile.url)
- self.html = self.load(pyfile.url, decode=True, cookies=True)
+ self.html = self.load(pyfile.url, decode=True)
if re.search(self.ADULT_PATTERN, self.html):
self.logInfo(_("Adult content confirmation needed"))
@@ -57,7 +58,7 @@ class UlozTo(SimpleHoster):
token = m.group(1)
self.html = self.load(pyfile.url, get={'do': "askAgeForm-submit"},
- post={"agree": "Confirm", "_token_": token}, cookies=True)
+ post={"agree": "Confirm", "_token_": token})
if self.PASSWD_PATTERN in self.html:
password = self.getPassword()
@@ -65,7 +66,7 @@ class UlozTo(SimpleHoster):
if password:
self.logInfo(_("Password protected link, trying ") + password)
self.html = self.load(pyfile.url, get={'do': "passwordProtectedForm-submit"},
- post={"password": password, "password_send": 'Send'}, cookies=True)
+ post={"password": password, "password_send": 'Send'})
if self.PASSWD_PATTERN in self.html:
self.fail(_("Incorrect password"))
@@ -82,7 +83,7 @@ class UlozTo(SimpleHoster):
else:
self.handleFree(pyfile)
- self.doCheckDownload()
+ self.checkFile()
def handleFree(self, pyfile):
@@ -117,14 +118,14 @@ class UlozTo(SimpleHoster):
self.error(_("CAPTCHA form changed"))
self.multiDL = True
- self.download("http://www.ulozto.net" + action, post=inputs, cookies=True, disposition=True)
+ self.download("http://www.ulozto.net" + action, post=inputs, disposition=True)
def handlePremium(self, pyfile):
self.download(pyfile.url, get={'do': "directDownload"}, disposition=True)
- def doCheckDownload(self):
+ def checkFile(self, rules={}):
check = self.checkDownload({
"wrong_captcha": re.compile(r'<ul class="error">\s*<li>Error rewriting the text.</li>'),
"offline" : re.compile(self.OFFLINE_PATTERN),
@@ -153,3 +154,5 @@ class UlozTo(SimpleHoster):
elif check == "not_found":
self.fail(_("Server error - file not downloadable"))
+ return super(UlozTo, self).checkFile(rules)
+