summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/UlozTo.py
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-04-20 01:05:23 +0200
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-04-20 01:05:23 +0200
commit6eee397f5bb655b49059f1027499d0f25b0615d7 (patch)
tree70d72caf6d70380ab42179c4a936d533fa2493bd /module/plugins/hoster/UlozTo.py
parentclosed #571 should fix the error message (diff)
downloadpyload-6eee397f5bb655b49059f1027499d0f25b0615d7.tar.xz
update uloz.to, uploading.com - closed #466
Diffstat (limited to 'module/plugins/hoster/UlozTo.py')
-rw-r--r--module/plugins/hoster/UlozTo.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py
index 54138e7e5..de60cb7c7 100644
--- a/module/plugins/hoster/UlozTo.py
+++ b/module/plugins/hoster/UlozTo.py
@@ -27,14 +27,14 @@ class UlozTo(SimpleHoster):
__name__ = "UlozTo"
__type__ = "hoster"
__pattern__ = r"http://(\w*\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj.cz|zachowajto.pl)/(?:live/)?(?P<id>\w+/[^/?]*)"
- __version__ = "0.85"
+ __version__ = "0.86"
__description__ = """uloz.to"""
__author_name__ = ("zoidberg")
FILE_NAME_PATTERN = r'<a href="#download" class="jsShowDownload">(?P<N>[^<]+)</a>'
FILE_SIZE_PATTERN = r'<span id="fileSize">(?P<S>[^<]+)</span>'
FILE_INFO_PATTERN = r'<p>File <strong>(?P<N>[^<]+)</strong> is password protected</p>'
- FILE_OFFLINE_PATTERN = r'<title>404 - Page not found</title>|<h1 class="h1">File was banned</h1>'
+ FILE_OFFLINE_PATTERN = r'<title>404 - Page not found</title>|<h1 class="h1">File (has been deleted|was banned)</h1>'
FILE_SIZE_REPLACEMENTS = [('([0-9.]+)\s([kMG])B', convertDecimalPrefix)]
FILE_URL_REPLACEMENTS = [(r"(?<=http://)([^/]+)", "www.ulozto.net")]
@@ -75,8 +75,10 @@ class UlozTo(SimpleHoster):
self.doCheckDownload()
def handleFree(self):
- parsed_url = self.findDownloadURL(premium=False)
-
+ action, inputs = self.parseHtmlForm('id="frm-downloadDialog-freeDownloadForm"')
+ if not action or not inputs:
+ self.parseError("free download form")
+
# get and decrypt captcha
captcha_id = self.getStorage("captcha_id")
captcha_text = self.getStorage("captcha_text")
@@ -95,7 +97,9 @@ class UlozTo(SimpleHoster):
self.setStorage("captcha_text", captcha_text)
self.multiDL = True
- self.download(parsed_url, post={"captcha[id]": captcha_id, "captcha[text]": captcha_text, "freeDownload": "Download"}, cookies=True)
+ inputs.update({"captcha[id]": captcha_id, "captcha[text]": captcha_text})
+
+ self.download("http://www.ulozto.net" + action, post=inputs, cookies=True)
def handlePremium(self):
parsed_url = self.findDownloadURL(premium=True)