diff options
author | spoob <spoob@gmx.de> | 2010-04-06 15:03:03 +0200 |
---|---|---|
committer | spoob <spoob@gmx.de> | 2010-04-06 15:03:03 +0200 |
commit | a580f52d824997c4acf9a172bac51fae9b996f11 (patch) | |
tree | 249da4fabb4f8fdd5706ba8cb37fb2eafec22696 /module/plugins/hoster | |
parent | captcha input for webif (diff) | |
download | pyload-a580f52d824997c4acf9a172bac51fae9b996f11.tar.xz |
Hotfile Premium
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/HotfileCom.py | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py index aef761da7..5fa05e7f6 100644 --- a/module/plugins/hoster/HotfileCom.py +++ b/module/plugins/hoster/HotfileCom.py @@ -43,6 +43,10 @@ class HotfileCom(Plugin): return False pyfile.status.filename = self.get_file_name() + + if self.config['premium']: + pyfile.status.url = self.get_file_url() + return True self.get_wait_time() pyfile.status.waituntil = self.time_plus_wait @@ -54,18 +58,24 @@ class HotfileCom(Plugin): return True def download_html(self): + if self.config['premium']: + self.req.add_auth(self.config['username'], self.config['password']) self.url = self.parent.url self.html[0] = self.req.load(self.url, cookies=True) def get_file_url(self): - form_content = re.search(r"<form style=.*(\n<.*>\s*)*?\n<tr>", self.html[0]).group(0) - form_posts = re.findall(r"<input\stype=hidden\sname=(\S*)\svalue=(\S*)>", form_content) - self.html[1] = self.req.load(self.url, post=form_posts, cookies=True) - file_url = re.search("a href=\"(http://hotfile\.com/get/\S*?)\"", self.html[1]).group(1) + if self.config['premium']: + file_url_pattern = r'<td><a href="(http://hotfile.com/get/.+?)" class="click_download">' + file_url = re.search(file_url_pattern, self.html[0]).group(1) + else: + form_content = re.search(r"<form style=.*(\n<.*>\s*)*?\n<tr>", self.html[0]).group(0) + form_posts = re.findall(r"<input\stype=hidden\sname=(\S*)\svalue=(\S*)>", form_content) + self.html[1] = self.req.load(self.url, post=form_posts, cookies=True) + file_url = re.search("a href=\"(http://hotfile\.com/get/\S*?)\"", self.html[1]).group(1) return file_url def get_file_name(self): - file_name = re.search(':</strong> (.+) <span>|</span>', self.html[0]).group(1) + file_name = re.search(r':</strong> (.+?) <span>\|</span>', self.html[0]).group(1) return file_name def file_exists(self): |