diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-19 00:21:18 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-19 00:21:18 +0200 |
commit | 664524c08bcd62214ae91e20d9624bf8e6827c2c (patch) | |
tree | 03e59c4b0bd03b1740778a283f9928d5d5159fdb | |
parent | change config path fix (diff) | |
download | pyload-664524c08bcd62214ae91e20d9624bf8e6827c2c.tar.xz |
fileserv, freakshare fix
-rw-r--r-- | module/plugins/hoster/FileserveCom.py | 10 | ||||
-rw-r--r-- | module/plugins/hoster/FreakshareNet.py | 16 | ||||
-rw-r--r-- | module/plugins/hoster/HotfileCom.py | 5 |
3 files changed, 23 insertions, 8 deletions
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index 753baa800..161c7bd9d 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -1,6 +1,9 @@ # -*- coding: utf-8 -*-
import re
+
+from os.path import join
+
from module.plugins.Hoster import Hoster
from module.plugins.ReCaptcha import ReCaptcha
@@ -88,5 +91,10 @@ class FileserveCom(Hoster): self.wait()
self.load(self.pyfile.url, post={"downloadLink":"show"})
-
+
+ header = self.load(self.pyfile.url, post={"download":"normal"}, just_header=True)
+ print header #TODO remove
self.download(self.pyfile.url, post={"download":"normal"})
+
+
+ #TODO: validate download it could be html file with errors
diff --git a/module/plugins/hoster/FreakshareNet.py b/module/plugins/hoster/FreakshareNet.py index 50c5c0941..82d0acb21 100644 --- a/module/plugins/hoster/FreakshareNet.py +++ b/module/plugins/hoster/FreakshareNet.py @@ -3,14 +3,13 @@ import re from module.plugins.Hoster import Hoster -from time import time - +from module.plugins.ReCaptcha import ReCaptcha class FreakshareNet(Hoster): __name__ = "FreakshareNet" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?freakshare\.net/files/\S*?/" - __version__ = "0.3" + __version__ = "0.31" __description__ = """Freakshare.com Download Hoster""" __author_name__ = ("sitacuisses","spoob","mkaay") __author_mail__ = ("sitacuisses@yahoo.de","spoob@pyload.org","mkaay@mkaay.de") @@ -25,7 +24,7 @@ class FreakshareNet(Hoster): self.pyfile = pyfile self.prepare() self.get_file_url() - + self.download(self.pyfile.url, post=self.req_opts) @@ -113,4 +112,13 @@ class FreakshareNet(Hoster): for item in to_sort: #Same as above request_options.append((item[1], item[0])) + challenge = re.search(r"http://api\.recaptcha\.net/challenge\?k=([0-9A-Za-z]+)", herewego) + + if challenge: + re_captcha = ReCaptcha(self) + challenge, result = re_captcha.challenge(challenge.group(1)) + + request_options.append(("recaptcha_challenge_field", challenge)) + request_options.append(("recaptcha_response_field", result)) + return request_options
\ No newline at end of file diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py index d5d255b1a..78fd14cf6 100644 --- a/module/plugins/hoster/HotfileCom.py +++ b/module/plugins/hoster/HotfileCom.py @@ -91,12 +91,11 @@ class HotfileCom(Hoster): form_posts = re.findall(r"<input\stype=hidden\sname=(\S*)\svalue=(\S*)>", form_content) self.html[1] = self.load(self.pyfile.url, post=form_posts, cookies=True) - - re_captcha = ReCaptcha(self) - + challenge = re.search(r"http://api\.recaptcha\.net/challenge\?k=([0-9A-Za-z]+)", self.html[1]) if challenge: + re_captcha = ReCaptcha(self) challenge, result = re_captcha.challenge(challenge.group(1)) url = re.search(r'<form action="(/dl/[^"]+)', self.html[1] ) |