diff options
| author | 2010-01-05 23:18:53 +0100 | |
|---|---|---|
| committer | 2010-01-05 23:18:53 +0100 | |
| commit | 8e9353a2e42a2e98d93618af1b6435568c44fa0f (patch) | |
| tree | 75b0aa46759a012fb8dadac55f554b2102a730c2 /module/plugins | |
| parent | added hook system (diff) | |
| download | pyload-8e9353a2e42a2e98d93618af1b6435568c44fa0f.tar.xz | |
fixed rapidshare slot wait
Diffstat (limited to 'module/plugins')
| -rw-r--r-- | module/plugins/__init__.py | 1 | ||||
| -rw-r--r-- | module/plugins/hoster/BluehostTo.py | 71 | ||||
| -rw-r--r-- | module/plugins/hoster/RapidshareCom.py | 2 | 
3 files changed, 1 insertions, 73 deletions
| diff --git a/module/plugins/__init__.py b/module/plugins/__init__.py index 8b1378917..e69de29bb 100644 --- a/module/plugins/__init__.py +++ b/module/plugins/__init__.py @@ -1 +0,0 @@ - diff --git a/module/plugins/hoster/BluehostTo.py b/module/plugins/hoster/BluehostTo.py deleted file mode 100644 index eff8ebcd8..000000000 --- a/module/plugins/hoster/BluehostTo.py +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import re -import time - -from module.Plugin import Plugin - -class BluehostTo(Plugin): - -    def __init__(self, parent): -        Plugin.__init__(self, parent) -        props = {} -        props['name'] = "BluehostTo" -        props['type'] = "hoster" -        props['pattern'] = r"http://(?:www.)?bluehost.to/file/" -        props['version'] = "0.1" -        props['description'] = """Bluehost Download PLugin""" -        props['author_name'] = ("RaNaN") -        props['author_mail'] = ("RaNaN@pyload.org") -        self.props = props -        self.parent = parent -        self.html = None -        self.multi_dl = False - -    def download_html(self): -        url = self.parent.url -        self.html = self.req.load(url) -        time.sleep(1.5) -        self.html = self.req.load(url, cookies=True) - -    def get_file_url(self): -        """ returns the absolute downloadable filepath -        """ -        if self.html == None: -            self.download_html() - -        inputs = re.findall(r"(<(input|form)[^>]+)", self.html) -        for i in inputs: -            if re.search(r"name=\"BluehostVers2dl\"",i[0]): -                self.BluehostVers2dl = re.search(r"value=\"([^\"]+)", i[0]).group(1) -            elif re.search(r"name=\"PHPSESSID\"",i[0]): -                self.PHPSESSID = re.search(r"value=\"([^\"]+)", i[0]).group(1) -            elif re.search(r"name=\"DownloadV2Hash\"",i[0]): -                self.DownloadV2Hash = re.search(r"value=\"([^\"]+)", i[0]).group(1) -            elif re.search(r"name=\"access\"",i[0]): -                self.access = re.search(r"value=\"([^\"]+)", i[0]).group(1) -            elif re.search(r"name=\"download\"",i[0]): -                url = re.search(r"action=\"([^\"]+)", i[0]).group(1) - -        return url - -    def get_file_name(self): -        if self.html == None: -            self.download_html() -        file_name_pattern = r"<center><b>.+: (.+)<\/b><\/center>" -        return re.search(file_name_pattern, self.html).group(1) - -    def file_exists(self): -        """ returns True or False -        """ -        if self.html == None: -            self.download_html() - -        if re.search(r"html", self.html) == None: -            return False -        else: -            return True - -    def proceed(self, url, location): -        self.req.download(url, location, {'BluehostVers2dl': self.BluehostVers2dl, 'DownloadV2Hash': self.DownloadV2Hash, 'PHPSESSID': self.PHPSESSID, 'access': self.access}) diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py index 754c885ef..677916dcf 100644 --- a/module/plugins/hoster/RapidshareCom.py +++ b/module/plugins/hoster/RapidshareCom.py @@ -143,7 +143,7 @@ class RapidshareCom(Plugin):              self.time_plus_wait = time() + 60 * int(wait_minutes)              self.want_reconnect = True          except: -            if re.search(r"(Currently a lot of users|There are no more download slots)", self.html[1], re.I) != None: +            if re.search(r"(currently a lot of users|no more download slots)", self.html[1], re.I) != None:                  self.time_plus_wait = time() + 130                  self.logger.info("Rapidshare: No free slots!")                  self.no_slots = True | 
