From 67db64c7c8c1813a4e22ed819846a69c6abefc2e Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 13 Jun 2011 20:19:23 +0200 Subject: erniebs patches --- module/plugins/hoster/HotfileCom.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/HotfileCom.py') diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py index 75806fe4e..2da443e29 100644 --- a/module/plugins/hoster/HotfileCom.py +++ b/module/plugins/hoster/HotfileCom.py @@ -86,14 +86,19 @@ class HotfileCom(Hoster): self.download(dl) def downloadHTML(self): - self.html[0] = self.load(self.pyfile.url, get={"lang":"en"}, cookies=True) + self.html[0] = self.load(self.pyfile.url, get={"lang":"en"}) def freeDownload(self): - form_content = re.search(r"
\s*)*?\n", self.html[0]).group(0) + form_content = re.search(r"\s*)*?[\n\t]?", self.html[0]) + if form_content is None: + print self.html[0] + self.fail("Form not found in HTML. Can not proceed.") + + form_content = form_content.group(0) form_posts = re.findall(r"", form_content) - self.html[1] = self.load(self.pyfile.url, post=form_posts, cookies=True) + self.html[1] = self.load(self.pyfile.url, post=form_posts) challenge = re.search(r"http://api\.recaptcha\.net/challenge\?k=([0-9A-Za-z]+)", self.html[1]) -- cgit v1.2.3