diff options
author | spoob <spoob@gmx.de> | 2010-04-13 18:54:55 +0200 |
---|---|---|
committer | spoob <spoob@gmx.de> | 2010-04-13 18:54:55 +0200 |
commit | 835e3a576051d9efb558bfcb7964947ab289c255 (patch) | |
tree | ff776f8b1f225829e897ab301eeb744afa42a742 /module/plugins/hoster | |
parent | filefactory fix (diff) | |
download | pyload-835e3a576051d9efb558bfcb7964947ab289c255.tar.xz |
Pack Fixes
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r-- | module/plugins/hoster/DepositfilesCom.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/DuckloadCom.py | 8 | ||||
-rw-r--r-- | module/plugins/hoster/FilefactoryCom.py | 7 | ||||
-rw-r--r-- | module/plugins/hoster/FilesmonsterCom.py | 13 | ||||
-rw-r--r-- | module/plugins/hoster/FreakshareNet.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/GigasizeCom.py | 10 | ||||
-rw-r--r-- | module/plugins/hoster/HotfileCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/MegauploadCom.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/MyvideoDe.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/RapidshareCom.py | 10 | ||||
-rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 10 | ||||
-rw-r--r-- | module/plugins/hoster/ShragleCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/StorageTo.py | 7 | ||||
-rw-r--r-- | module/plugins/hoster/XupIn.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/YoupornCom.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/YoutubeCom.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/ZippyshareCom.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/ZshareNet.py | 4 |
18 files changed, 45 insertions, 64 deletions
diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index 11c202013..b5ab5c6f7 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -29,7 +29,7 @@ class DepositfilesCom(Plugin): return re.search('File name: <b title="(.*)">', self.html).group(1) def file_exists(self): - self.html = self.req.load(self.parent.url) + self.html = self.load(self.parent.url) if re.search(r"Such file does not exist or it has been removed for infringement of copyrights", self.html) != None: return False return True diff --git a/module/plugins/hoster/DuckloadCom.py b/module/plugins/hoster/DuckloadCom.py index 7482fe617..31b7d112b 100644 --- a/module/plugins/hoster/DuckloadCom.py +++ b/module/plugins/hoster/DuckloadCom.py @@ -47,8 +47,8 @@ class DuckloadCom(Plugin): def download_html(self):
url = self.parent.url
- self.html[0] = self.req.load(url, cookies=True)
- self.html[1] = self.req.load(url, cookies=True, post={"server": "1", "sn": "Stream Starten"})
+ self.html[0] = self.load(url)
+ self.html[1] = self.load(url, post={"server": "1", "sn": "Stream Starten"})
def get_file_url(self):
""" returns the absolute downloadable filepath
@@ -80,7 +80,3 @@ class DuckloadCom(Plugin): return False
else:
return True
-
- def proceed(self, url, location):
- self.req.download(url, location, cookies=True)
-
diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 873fb548e..0125d442e 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -50,9 +50,9 @@ class FilefactoryCom(Plugin): def download_html(self): url = self.parent.url - self.html = self.req.load(url, cookies=True) + self.html = self.load(url, cookies=True) tempurl = re.search('a href=\"(.*?)\".*?button\.basic\.jpg', self.html).group(1) - self.htmlwithlink = self.req.load("http://www.filefactory.com"+tempurl, cookies=True) + self.htmlwithlink = self.load("http://www.filefactory.com"+tempurl, cookies=True) def get_file_url(self): """ returns the absolute downloadable filepath @@ -97,6 +97,5 @@ class FilefactoryCom(Plugin): return True def proceed(self, url, location): - - self.req.download(url, location, cookies=True) + self.download(url, location, cookies=True) diff --git a/module/plugins/hoster/FilesmonsterCom.py b/module/plugins/hoster/FilesmonsterCom.py index 27c687363..99a2ccd57 100644 --- a/module/plugins/hoster/FilesmonsterCom.py +++ b/module/plugins/hoster/FilesmonsterCom.py @@ -38,7 +38,7 @@ class FilesmonsterCom(Plugin): def download_html(self): self.url = self.parent.url - self.html = self.req.load(self.url) # get the start page + self.html = self.load(self.url) # get the start page def get_file_url(self): """ returns the absolute downloadable filepath @@ -62,8 +62,6 @@ class FilesmonsterCom(Plugin): return self.parent.url def file_exists(self): - """ returns True or False - """ if self.html == None: self.download_html() if re.search(r"Such file does not exist or it has been removed for infringement of copyrights.", self.html) != None: @@ -73,15 +71,15 @@ class FilesmonsterCom(Plugin): def get_download_page(self): herewego = re.findall(r"<form\sid=\'slowdownload\'\smethod=\"post\"\saction=\"http://filesmonster.com/get/free/\">\s*\n\s*<input\stype=\"hidden\"\sname=\"(\S*?)\"\svalue=\"(\S*?)\"\s*>", self.html) - the_download_page = self.req.load("http://filesmonster.com/get/free/", None, herewego) + the_download_page = self.load("http://filesmonster.com/get/free/", None, herewego) temporary_filtered = re.search(r"</div><form\sid=\'rtForm\'\sname=\"rtForm\"\smethod=\"post\">\s*\n(\s*<input\stype=\'hidden\'\sname=\'(\S*?)\'\svalue=\'(\S*?)\'>\s*\n)*?\s*</form>", the_download_page).group(0) all_the_tuples = re.findall(r"<input\stype=\'hidden\'\sname=\'(\S*?)\'\svalue=\'(\S*?)\'", temporary_filtered) time.sleep(30) herewego = None - herewego = self.req.load('http://filesmonster.com/ajax.php', None, all_the_tuples) + herewego = self.load('http://filesmonster.com/ajax.php', None, all_the_tuples) ticket_number = re.search(r"\"text\":\"(.*?)\"\,\"error\"", herewego).group(1) herewego = None - herewego = self.req.load('http://filesmonster.com/ajax.php', None, {'act': 'getdl', 'data': ticket_number}) + herewego = self.load('http://filesmonster.com/ajax.php', None, {'act': 'getdl', 'data': ticket_number}) ticket_number = None ticket_number = re.search(r"\"url\":\"(.*?)\"", herewego).group(1) the_download_page = re.sub(r"\\/", r"/", ticket_number) @@ -90,5 +88,4 @@ class FilesmonsterCom(Plugin): self.filerequest = re.search(r"\"file_request\":\"(.*?)\"", herewego).group(1) def proceed(self, url, location): - - self.req.download(url, location, None, {"X-File-Request": self.filerequest}) + self.download(url, location, None, {"X-File-Request": self.filerequest}) diff --git a/module/plugins/hoster/FreakshareNet.py b/module/plugins/hoster/FreakshareNet.py index 4d5d4d5b9..8c7dc5a2c 100644 --- a/module/plugins/hoster/FreakshareNet.py +++ b/module/plugins/hoster/FreakshareNet.py @@ -52,7 +52,7 @@ class FreakshareNet(Plugin): def download_html(self): url = self.parent.url - self.html = self.req.load(url, cookies=True) + self.html = self.load(url, cookies=True) def get_file_url(self): """ returns the absolute downloadable filepath @@ -101,7 +101,7 @@ class FreakshareNet(Plugin): request_options = list() for item in to_sort: #Name value pairs are output reversed from regex, so we reorder them request_options.append((item[1], item[0])) - herewego = self.req.load(self.parent.url, None, request_options, cookies=True) # the actual download-Page + herewego = self.load(self.parent.url, None, request_options, cookies=True) # the actual download-Page to_sort = None to_sort = re.findall(r"<input\stype=\".*?\"\svalue=\"(\S*?)\".*?name=\"(\S*?)\"\s.*?\/>", herewego) request_options = list() @@ -140,4 +140,4 @@ class FreakshareNet(Plugin): temp_response = temp_conn.getresponse() new_url = temp_response.getheader("Location") # we need the Location-header temp_conn.close - self.req.download(new_url, location, None, None, cookies=False) + self.download(new_url, location, cookies=False) diff --git a/module/plugins/hoster/GigasizeCom.py b/module/plugins/hoster/GigasizeCom.py index e22fe8593..a14e17bf8 100644 --- a/module/plugins/hoster/GigasizeCom.py +++ b/module/plugins/hoster/GigasizeCom.py @@ -29,14 +29,14 @@ class GigasizeCom(Plugin): def download_html(self): url = self.parent.url - self.html[0] = self.req.load(url, cookies=True) + self.html[0] = self.load(url, cookies=True) captcha_image = tempfile.NamedTemporaryFile(suffix=".jpg").name for i in range(5): - self.req.download("http://www.gigasize.com/randomImage.php", captcha_image, cookies=True) + self.download("http://www.gigasize.com/randomImage.php", captcha_image, cookies=True) captcha = self.ocr.get_captcha(captcha_image) - self.html[1] = self.req.load("http://www.gigasize.com/formdownload.php", None, {"txtNumber": captcha}, cookies=True) + self.html[1] = self.load("http://www.gigasize.com/formdownload.php", None, {"txtNumber": captcha}, cookies=True) if re.search(r"Package features", self.html[1]) != None: if re.search(r"YOU HAVE REACHED YOUR HOURLY LIMIT", self.html[1]) != None: @@ -78,7 +78,3 @@ class GigasizeCom(Plugin): return False else: return True - - def proceed(self, url, location): - print url - print self.req.load(url, cookies=True) diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py index 38e7caca8..d412ddd23 100644 --- a/module/plugins/hoster/HotfileCom.py +++ b/module/plugins/hoster/HotfileCom.py @@ -61,7 +61,7 @@ class HotfileCom(Plugin): self.req.add_auth(self.config['username'], self.config['password']) self.url = self.parent.url + "?lang=en" print self.url - self.html[0] = self.req.load(self.url, cookies=True) + self.html[0] = self.load(self.url, cookies=True) def get_file_url(self): if self.config['premium']: @@ -70,7 +70,7 @@ class HotfileCom(Plugin): 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) + self.html[1] = self.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 diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py index deeedc691..a544775d4 100644 --- a/module/plugins/hoster/MegauploadCom.py +++ b/module/plugins/hoster/MegauploadCom.py @@ -31,14 +31,14 @@ class MegauploadCom(Plugin): captcha_image = tempfile.NamedTemporaryFile(suffix=".gif").name for i in range(5): - self.html[0] = self.req.load(self.parent.url, cookies=True) + self.html[0] = self.load(self.parent.url, cookies=True) url_captcha_html = re.search('(http://www.{,3}\.megaupload\.com/gencap.php\?.*\.gif)', self.html[0]).group(1) - self.req.download(url_captcha_html, captcha_image, cookies=True) + self.download(url_captcha_html, captcha_image, cookies=True) captcha = self.ocr.get_captcha(captcha_image) os.remove(captcha_image) captchacode = re.search('name="captchacode" value="(.*)"', self.html[0]).group(1) megavar = re.search('name="megavar" value="(.*)">', self.html[0]).group(1) - self.html[1] = self.req.load(self.parent.url, post={"captcha": captcha, "captchacode": captchacode, "megavar": megavar}, cookies=True) + self.html[1] = self.load(self.parent.url, post={"captcha": captcha, "captchacode": captchacode, "megavar": megavar}, cookies=True) if re.search(r"Waiting time before each download begins", self.html[1]) != None: break self.time_plus_wait = time() + 45 diff --git a/module/plugins/hoster/MyvideoDe.py b/module/plugins/hoster/MyvideoDe.py index 0fe315547..365cca59c 100644 --- a/module/plugins/hoster/MyvideoDe.py +++ b/module/plugins/hoster/MyvideoDe.py @@ -20,7 +20,7 @@ class MyvideoDe(Plugin): self.url = self.parent.url def download_html(self): - self.html = self.req.load(self.url) + self.html = self.load(self.url) def get_file_url(self): videoId = re.search(r"addVariable\('_videoid','(.*)'\);p.addParam\('quality'", self.html).group(1) @@ -34,7 +34,7 @@ class MyvideoDe(Plugin): def file_exists(self): self.download_html() - self.req.load(str(self.url), cookies=False, just_header=True) + self.load(str(self.url), cookies=False, just_header=True) if self.req.lastEffectiveURL == "http://www.myvideo.de/": return False return True diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py index 856f06529..506cee6c1 100644 --- a/module/plugins/hoster/RapidshareCom.py +++ b/module/plugins/hoster/RapidshareCom.py @@ -80,7 +80,7 @@ class RapidshareCom(Plugin): if m: api_param_file["files"] = m.group(1) api_param_file["filenames"] = m.group(2) - src = self.req.load(api_url_base, cookies=False, get=api_param_file) + src = self.load(api_url_base, cookies=False, get=api_param_file) if src.startswith("ERROR"): return fields = src.split(",") @@ -108,7 +108,7 @@ class RapidshareCom(Plugin): if self.config["premium"]: api_param_prem = {"sub": "getaccountdetails_v1", "type": "prem", \ "login": self.config['username'], "password": self.config['password']} - src = self.req.load(api_url_base, cookies=False, get=api_param_prem) + src = self.load(api_url_base, cookies=False, get=api_param_prem) if src.startswith("ERROR"): self.config["premium"] = False self.logger.info("Rapidshare: Login failed") @@ -125,13 +125,13 @@ class RapidshareCom(Plugin): def download_html(self): """ gets the url from self.parent.url saves html in self.html and parses """ - self.html[0] = self.req.load(self.url, cookies=True) + self.html[0] = self.load(self.url, cookies=True) def get_wait_time(self): """downloads html with the important informations """ file_server_url = re.search(r"<form action=\"(.*?)\"", self.html[0]).group(1) - self.html[1] = self.req.load(file_server_url, cookies=True, post={"dl.start": "Free"}) + self.html[1] = self.load(file_server_url, cookies=True, post={"dl.start": "Free"}) if re.search(r"is already downloading", self.html[1]): self.logger.info(_("Rapidshare: Already downloading, wait 30 minutes")) @@ -176,7 +176,7 @@ class RapidshareCom(Plugin): def proceed(self, url, location): if self.config['premium']: self.req.add_auth(self.config['username'], self.config['password']) - self.req.download(url, location, cookies=True) + self.download(url, location) def check_file(self, local_file): if self.api_data and self.api_data["checksum"]: diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index b76e83568..68bfeab61 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -56,7 +56,7 @@ class ShareonlineBiz(Plugin): """ api_url_base = "http://www.share-online.biz/linkcheck/linkcheck.php?md5=1" api_param_file = {"links": self.url} - src = self.req.load(api_url_base, cookies=False, post=api_param_file) + src = self.load(api_url_base, cookies=False, post=api_param_file) fields = src.split(";") self.api_data = {} @@ -77,9 +77,9 @@ class ShareonlineBiz(Plugin): "pass": self.config['password'], "login":"Log+me+in", "folder_autologin":"1"} - self.req.load("http://www.share-online.biz/login.php", cookies=True, post=post_vars) + self.load("http://www.share-online.biz/login.php", cookies=True, post=post_vars) url = self.parent.url - self.html[0] = self.req.load(url, cookies=True) + self.html[0] = self.load(url, cookies=True) if not self.config['premium']: #captcha_image = tempfile.NamedTemporaryFile(suffix=".jpg").name @@ -87,12 +87,12 @@ class ShareonlineBiz(Plugin): for i in range(10): captcha_image = tempfile.NamedTemporaryFile(suffix=".jpg").name - self.req.download("http://www.share-online.biz/captcha.php?rand="+ "0." + str(random.randint(10**15,10**16)), captcha_image, cookies=True) + self.download("http://www.share-online.biz/captcha.php?rand="+ "0." + str(random.randint(10**15,10**16)), captcha_image, cookies=True) captcha = self.ocr.get_captcha(captcha_image) os.remove(captcha_image) self.logger.debug("Captcha %s: %s" % (i, captcha)) sleep(3) - self.html[1] = self.req.load(url, post={"captchacode": captcha}, cookies=True) + self.html[1] = self.load(url, post={"captchacode": captcha}, cookies=True) if re.search(r"Der Download ist Ihnen zu langsam", self.html[1]) != None: self.time_plus_wait = time() + 15 return True diff --git a/module/plugins/hoster/ShragleCom.py b/module/plugins/hoster/ShragleCom.py index c0cc9de72..fddd113b1 100644 --- a/module/plugins/hoster/ShragleCom.py +++ b/module/plugins/hoster/ShragleCom.py @@ -34,7 +34,7 @@ class ShragleCom(Plugin): def download_html(self): url = self.parent.url - self.html = self.req.load(url) + self.html = self.load(url) self.time_plus_wait = time.time() + 10 def get_file_url(self): @@ -69,4 +69,4 @@ class ShragleCom(Plugin): return True def proceed(self, url, location): - self.req.download(url, location, {'fileID': self.fileID, 'dlSession': self.dlSession, 'userID': self.userID, 'password': self.password, 'lang': self.lang}) + self.download(url, location, {'fileID': self.fileID, 'dlSession': self.dlSession, 'userID': self.userID, 'password': self.password, 'lang': self.lang}) diff --git a/module/plugins/hoster/StorageTo.py b/module/plugins/hoster/StorageTo.py index 86e04dfd0..fb5a07189 100644 --- a/module/plugins/hoster/StorageTo.py +++ b/module/plugins/hoster/StorageTo.py @@ -60,12 +60,12 @@ class StorageTo(Plugin): def download_html(self): url = self.parent.url - self.html = self.req.load(url, cookies=True) + self.html = self.load(url, cookies=True) def download_api_data(self): url = self.parent.url info_url = url.replace("/get/", "/getlink/") - src = self.req.load(info_url, cookies=True) + src = self.load(info_url, cookies=True) pattern = re.compile(r"'(\w+)' : (.*?)[,|\}]") self.api_data = {} for pair in pattern.findall(src): @@ -106,6 +106,3 @@ class StorageTo(Plugin): self.download_html() file_name_pattern = r"<span class=\"orange\">Downloading:</span>(.*?)<span class=\"light\">(.*?)</span>" return re.search(file_name_pattern, self.html).group(1).strip() - - def proceed(self, url, location): - self.req.download(url, location, cookies=True) diff --git a/module/plugins/hoster/XupIn.py b/module/plugins/hoster/XupIn.py index 2a914b3d5..f48a3e944 100644 --- a/module/plugins/hoster/XupIn.py +++ b/module/plugins/hoster/XupIn.py @@ -36,10 +36,10 @@ class XupIn(Plugin): return re.search(file_name_pattern, self.html).group(1) def file_exists(self): - self.html = self.req.load(self.url) + self.html = self.load(self.url) if re.search(r"File does not exist", self.html) != None or self.html == "": return False return True def proceed(self, url, location): - self.req.download(url, location, post=self.posts) + self.download(url, location, post=self.posts) diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py index e501954da..db9cdb85f 100644 --- a/module/plugins/hoster/YoupornCom.py +++ b/module/plugins/hoster/YoupornCom.py @@ -33,7 +33,7 @@ class YoupornCom(Plugin): def download_html(self): url = self.parent.url - self.html = self.req.load(url) + self.html = self.load(url) def get_file_url(self): """ returns the absolute downloadable filepath diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index 5f3874640..a3185872d 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -24,7 +24,7 @@ class YoutubeCom(Plugin): def download_html(self): url = self.parent.url - self.html = self.req.load(url) + self.html = self.load(url) def get_file_url(self): """ returns the absolute downloadable filepath diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index bec7f8c65..577d036ea 100644 --- a/module/plugins/hoster/ZippyshareCom.py +++ b/module/plugins/hoster/ZippyshareCom.py @@ -25,7 +25,7 @@ class ZippyshareCom(Plugin): def download_html(self): url = self.parent.url - self.html = self.req.load(url, cookies=True) + self.html = self.load(url, cookies=True) def get_file_url(self): """ returns the absolute downloadable filepath @@ -53,7 +53,3 @@ class ZippyshareCom(Plugin): return False else: return True - - def proceed(self, url, location): - - self.req.download(url, location, cookies=True) diff --git a/module/plugins/hoster/ZshareNet.py b/module/plugins/hoster/ZshareNet.py index 08f28a35c..c3de0e475 100644 --- a/module/plugins/hoster/ZshareNet.py +++ b/module/plugins/hoster/ZshareNet.py @@ -27,14 +27,14 @@ class ZshareNet(Plugin): def download_html(self): url = self.parent.url - self.html[0] = self.req.load(url) + self.html[0] = self.load(url) if "/video/" in url: url = url.replace("/video/", "/download/") elif "/audio/" in url: url = url.replace("/audio/", "/download/") elif "/image/" in url: url = url.replace("/image/", "/download/") - self.html[1] = self.req.load(url, None, {"download": "1"}) + self.html[1] = self.load(url, None, {"download": "1"}) def get_file_url(self): """ returns the absolute downloadable filepath |