From 6eee397f5bb655b49059f1027499d0f25b0615d7 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Fri, 20 Apr 2012 01:05:23 +0200 Subject: update uloz.to, uploading.com - closed #466 --- module/plugins/hoster/UlozTo.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/UlozTo.py') 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\w+/[^/?]*)" - __version__ = "0.85" + __version__ = "0.86" __description__ = """uloz.to""" __author_name__ = ("zoidberg") FILE_NAME_PATTERN = r'(?P[^<]+)' FILE_SIZE_PATTERN = r'(?P[^<]+)' FILE_INFO_PATTERN = r'

File (?P[^<]+) is password protected

' - FILE_OFFLINE_PATTERN = r'404 - Page not found|

File was banned

' + FILE_OFFLINE_PATTERN = r'404 - Page not found|

File (has been deleted|was banned)

' 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) -- cgit v1.2.3