diff options
author | zoidberg10 <zoidberg@mujmail.cz> | 2012-08-02 18:19:43 +0200 |
---|---|---|
committer | zoidberg10 <zoidberg@mujmail.cz> | 2012-08-02 18:19:43 +0200 |
commit | fc6b723aee82aa241f514bff99819e4960f72ec9 (patch) | |
tree | 1d5dd1552a60844e0ffddd597dea0d351b8537dd /module/plugins | |
parent | DeathByCaptcha plugin (diff) | |
download | pyload-fc6b723aee82aa241f514bff99819e4960f72ec9.tar.xz |
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/hoster/BitshareCom.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/IcyFilesCom.py | 21 |
2 files changed, 13 insertions, 14 deletions
diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index 6d6b9c26d..f5d59d428 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -46,14 +46,14 @@ 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.44" + __version__ = "0.45" __description__ = """Bitshare.Com File Download Hoster""" __author_name__ = ("paulking", "fragonib") __author_mail__ = (None, "fragonib[AT]yahoo[DOT]es") HOSTER_DOMAIN = "bitshare.com" 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\s(?P<name>.+?)\s-\s(?P<size>[\d.]+)\s(?P<units>..)yte</h1>' + 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=(.*?) " @@ -166,4 +166,4 @@ class BitshareCom(Hoster): elif "ERROR:SESSION ERROR" in response: self.retry() self.logDebug("Wrong captcha") - self.invalidCaptcha()
\ No newline at end of file + self.invalidCaptcha() diff --git a/module/plugins/hoster/IcyFilesCom.py b/module/plugins/hoster/IcyFilesCom.py index cda5d23b6..73dd5f7c9 100644 --- a/module/plugins/hoster/IcyFilesCom.py +++ b/module/plugins/hoster/IcyFilesCom.py @@ -33,7 +33,7 @@ def getInfo(urls): size = re.search(IcyFilesCom.SIZE_PATTERN, html) if name is not None: name = name.group(1) - size = size.group(1) + size = (size.group(1) * 1000000) result.append((name, size, 2, url)) yield result @@ -42,7 +42,7 @@ class IcyFilesCom(Hoster): __name__ = "IcyFilesCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?icyfiles\.com/.*" - __version__ = "0.01" + __version__ = "0.02" __description__ = """IcyFiles.com plugin - free only""" __author_name__ = ("godofdream") __author_mail__ = ("soilfiction@gmail.com") @@ -51,8 +51,8 @@ class IcyFilesCom(Hoster): SIZE_PATTERN = r'<li>(\d+) <span>Size/mb' FILE_OFFLINE_PATTERN = r'The requested File cant be found' WAIT_LONGER_PATTERN = r'All download tickets are in use\. please try it again in a few seconds' - WAIT_PATTERN = r'<div class="counter">(d+)</div>' - TOOMUCH_PATTERN = r'Sorry dude, you have downloaded too much\. Please wait (\\d+) seconds' + WAIT_PATTERN = r'<div class="counter">(\d+)</div>' + TOOMUCH_PATTERN = r'Sorry dude, you have downloaded too much\. Please wait (\d+) seconds' URL_PATTERN = r'http://.*?icyfiles\.com/(.*)' def setup(self): @@ -66,14 +66,17 @@ class IcyFilesCom(Hoster): # All Downloadtickets in use timmy = re.search(self.WAIT_LONGER_PATTERN, self.html) if timmy: + self.logDebug("waitforfreeslot") self.waitForFreeSlot() # Wait the waittime timmy = re.search(self.WAIT_PATTERN, self.html) if timmy: + self.logDebug("waiting", timmy.group(1)) self.waitSeconds(timmy.group(1)) # Downloaded to much timmy = re.search(self.TOOMUCH_PATTERN, self.html) if timmy: + self.logDebug("too much", timmy.group(1)) self.waitSeconds(timmy.group(1)) # Find Name found = re.search(self.FILE_NAME_PATTERN, self.html) @@ -86,9 +89,7 @@ class IcyFilesCom(Hoster): if found is None: self.fail("Parse error (URL)") download_url = "http://icyfiles.com/download.php?key=" + found.group(1) - self.download(download_url) - # check download check = self.checkDownload({ "notfound": re.compile(r"^<head><title>404 Not Found</title>$"), @@ -103,13 +104,11 @@ class IcyFilesCom(Hoster): elif check == "waitforfreeslots": self.waitForFreeSlot() elif check == "downloadedtoomuch": - self.retry() + self.retry() def waitForFreeSlot(self): - self.setWait(900, True) - self.wait() - self.retry(60, 1, "Wait for free slot") + self.retry(60, 60, "Wait for free slot") def waitSeconds(self, seconds): - self.setWait(seconds + 2) + self.setWait(int(seconds) + 2) self.wait() |