diff options
Diffstat (limited to 'module/plugins/hoster')
| -rw-r--r-- | module/plugins/hoster/BitshareCom.py | 22 | 
1 files changed, 16 insertions, 6 deletions
| diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index ab194cb94..644345387 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -46,7 +46,7 @@ class BitshareCom(Hoster):      __name__ = "BitshareCom"      __type__ = "hoster"      __pattern__ = r"http://(www\.)?bitshare\.com/(files/(?P<id1>[a-zA-Z0-9]+)(/(?P<name>.*?)\.html)?|\?f=(?P<id2>[a-zA-Z0-9]+))" -    __version__ = "0.46" +    __version__ = "0.47"      __description__ = """Bitshare.Com File Download Hoster"""      __author_name__ = ("paulking", "fragonib")      __author_mail__ = (None, "fragonib[AT]yahoo[DOT]es") @@ -55,8 +55,9 @@ class BitshareCom(Hoster):      FILE_OFFLINE_PATTERN = r'''(>We are sorry, but the requested file was not found in our database|>Error - File not available<|The file was deleted either by the uploader, inactivity or due to copyright claim)'''      FILE_INFO_PATTERN = r'<h1>(Downloading|Streaming)\s(?P<name>.+?)\s-\s(?P<size>[\d.]+)\s(?P<units>..)yte</h1>'      FILE_AJAXID_PATTERN = r'var ajaxdl = "(.*?)";' -    CAPTCHA_KEY_PATTERN = r"http://api\.recaptcha\.net/challenge\?k=(.*?) "  -         +    CAPTCHA_KEY_PATTERN = r"http://api\.recaptcha\.net/challenge\?k=(.*?) " +    TRAFFIC_USED_UP = r"Your Traffic is used up for today. Upgrade to premium to continue!" +      def setup(self):          self.multiDL = self.premium          self.chunkLimit = 1 @@ -79,7 +80,16 @@ class BitshareCom(Hoster):          # Check offline          if re.search(self.FILE_OFFLINE_PATTERN, self.html) is not None:              self.offline() -            + +        # Check Traffic used up +        if re.search(BitshareCom.TRAFFIC_USED_UP, self.html) is not None: +            self.logInfo("Your Traffic is used up for today. Wait 1800 seconds or reconnect!") +            self.logDebug("Waiting %d seconds." % 1800) +            self.setWait(1800, True) +            self.wantReconnect = True +            self.wait() +            self.retry() +          # File name          m = re.search(BitshareCom.__pattern__, self.pyfile.url)          name1 = m.group('name') if m is not None else None @@ -124,8 +134,8 @@ class BitshareCom(Hoster):              else:                  self.setWait(wait - 55, True)                  self.wait() -                self.retry()   -             +                self.retry() +          # Resolve captcha          if captcha == 1:              self.logDebug("File is captcha protected") | 
