diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-11-17 16:14:22 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-11-17 16:14:22 +0100 |
commit | 0b27b9690f626fff0f494b32093be5736c2d1b6b (patch) | |
tree | edbe6c49c95c9fd3f1982048e7f5a1dad49937d2 /pyload/plugins/hoster/FastshareCz.py | |
parent | fixed the plugin parser to handle multi line statements (diff) | |
parent | Merge pull request #394 from vuolter/s/hoster/Keep2shareCC (diff) | |
download | pyload-0b27b9690f626fff0f494b32093be5736c2d1b6b.tar.xz |
Merge remote-tracking branch 'origin/stable'
Conflicts:
module/config/default.conf
module/plugins/accounts/DdlstorageCom.py
module/plugins/accounts/RealdebridCom.py
module/plugins/accounts/UploadheroCom.py
module/plugins/crypter/DownloadVimeoCom.py
module/plugins/crypter/FilebeerInfoFolder.py
module/plugins/crypter/Movie2kTo.py
module/plugins/hooks/AlldebridCom.py
module/plugins/hooks/DebridItaliaCom.py
module/plugins/hooks/MultishareCz.py
module/plugins/hooks/Premium4Me.py
module/plugins/hooks/PremiumizeMe.py
module/plugins/hooks/RealdebridCom.py
module/plugins/hooks/XFileSharingPro.py
module/plugins/hooks/ZeveraCom.py
module/plugins/hoster/ChipDe.py
module/plugins/hoster/DdlstorageCom.py
module/plugins/hoster/MovReelCom.py
module/plugins/hoster/RyushareCom.py
module/plugins/hoster/ShareRapidCom.py
module/plugins/hoster/SpeedLoadOrg.py
module/plugins/hoster/ZeveraCom.py
module/web/media/default/css/default.css
module/web/media/default/css/window.css
module/web/templates/default/base.html
module/web/templates/default/captcha.html
module/web/templates/default/home.html
module/web/templates/default/queue.html
module/web/templates/default/window.html
pyload/plugins/accounts/AlldebridCom.py
pyload/plugins/accounts/Http.py
pyload/plugins/accounts/MultishareCz.py
pyload/plugins/accounts/Premium4Me.py
pyload/plugins/accounts/PremiumizeMe.py
pyload/plugins/accounts/ZeveraCom.py
pyload/plugins/addons/Captcha9kw.py
pyload/plugins/addons/CaptchaTrader.py
pyload/plugins/addons/ClickAndLoad.py
pyload/plugins/addons/Ev0InFetcher.py
pyload/plugins/addons/ExternalScripts.py
pyload/plugins/addons/ExtractArchive.py
pyload/plugins/addons/HotFolder.py
pyload/plugins/addons/MergeFiles.py
pyload/plugins/addons/MultiHome.py
pyload/plugins/addons/XMPPInterface.py
pyload/plugins/crypter/C1neonCom.py
pyload/plugins/crypter/CryptItCom.py
pyload/plugins/crypter/ILoadTo.py
pyload/plugins/crypter/LofCc.py
pyload/plugins/crypter/NCryptIn.py
pyload/plugins/crypter/OronComFolder.py
pyload/plugins/crypter/RSLayerCom.py
pyload/plugins/crypter/SecuredIn.py
pyload/plugins/crypter/TrailerzoneInfo.py
pyload/plugins/crypter/WiiReloadedOrg.py
pyload/plugins/hoster/AlldebridCom.py
pyload/plugins/hoster/BasePlugin.py
pyload/plugins/hoster/CzshareCom.py
pyload/plugins/hoster/DepositfilesCom.py
pyload/plugins/hoster/EgoFilesCom.py
pyload/plugins/hoster/FastshareCz.py
pyload/plugins/hoster/FreakshareCom.py
pyload/plugins/hoster/MegasharesCom.py
pyload/plugins/hoster/MultishareCz.py
pyload/plugins/hoster/MyvideoDe.py
pyload/plugins/hoster/NetloadIn.py
pyload/plugins/hoster/NovafileCom.py
pyload/plugins/hoster/NowDownloadEu.py
pyload/plugins/hoster/PornhostCom.py
pyload/plugins/hoster/Premium4Me.py
pyload/plugins/hoster/PremiumizeMe.py
pyload/plugins/hoster/PutlockerCom.py
pyload/plugins/hoster/RapidshareCom.py
pyload/plugins/hoster/RealdebridCom.py
pyload/plugins/hoster/ShareplaceCom.py
pyload/plugins/hoster/TusfilesNet.py
pyload/plugins/hoster/UnrestrictLi.py
pyload/plugins/hoster/UploadedTo.py
pyload/plugins/hoster/WebshareCz.py
pyload/plugins/hoster/X7To.py
pyload/plugins/hoster/XHamsterCom.py
pyload/plugins/hoster/YoupornCom.py
pyload/plugins/hoster/YourfilesTo.py
pyload/plugins/hoster/YoutubeCom.py
pyload/plugins/hoster/ZippyshareCom.py
pyload/plugins/internal/SimpleCrypter.py
pyload/plugins/internal/SimpleHoster.py
Diffstat (limited to 'pyload/plugins/hoster/FastshareCz.py')
-rw-r--r-- | pyload/plugins/hoster/FastshareCz.py | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/pyload/plugins/hoster/FastshareCz.py b/pyload/plugins/hoster/FastshareCz.py index 47ecda65a..3e33d0fd9 100644 --- a/pyload/plugins/hoster/FastshareCz.py +++ b/pyload/plugins/hoster/FastshareCz.py @@ -20,58 +20,47 @@ # http://www.fastshare.cz/2141189/random.bin import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, replace_patterns +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FastshareCz(SimpleHoster): __name__ = "FastshareCz" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)?fastshare.cz/\d+/.+" - __version__ = "0.16" + __version__ = "0.20" __description__ = """FastShare.cz""" __author_name__ = ("zoidberg", "stickell") FILE_INFO_PATTERN = r'<h1 class="dwp">(?P<N>[^<]+)</h1>\s*<div class="fileinfo">\s*(?:Velikost|Size)\s*: (?P<S>[^,]+),' - FILE_OFFLINE_PATTERN = ur'<td align=center>Tento soubor byl smazán' + FILE_OFFLINE_PATTERN = 'The file ?has been deleted' FILE_URL_REPLACEMENTS = [('#.*', '')] + SH_COOKIES = [('fastshare.cz', 'lang', 'en')] FREE_URL_PATTERN = r'action=(/free/.*?)>\s*<img src="([^"]*)"><br' PREMIUM_URL_PATTERN = r'(http://data\d+\.fastshare\.cz/download\.php\?id=\d+\&[^\s\"\'<>]+)' NOT_ENOUGH_CREDIC_PATTERN = "Nem.te dostate.n. kredit pro sta.en. tohoto souboru" - def process(self, pyfile): - pyfile.url = replace_patterns(pyfile.url, self.FILE_URL_REPLACEMENTS) - self.req.setOption("timeout", 120) - if self.premium and (not self.SH_CHECK_TRAFFIC or self.checkTrafficLeft()): - self.handlePremium() - else: - self.html = self.load(pyfile.url, decode=not self.SH_BROKEN_ENCODING, cookies=self.SH_COOKIES) - self.getFileInfo() - self.handleFree() - def handleFree(self): - if u">100% FREE slotů je plných.<" in self.html: - self.setWait(60, False) - self.wait() - self.retry(120, "No free slots") + if '100% of FREE slots are full' in self.html: + self.retry(120, 60, "No free slots") found = re.search(self.FREE_URL_PATTERN, self.html) if not found: self.parseError("Free URL") action, captcha_src = found.groups() - captcha = self.decryptCaptcha("http://www.fastshare.cz/" + captcha_src) - self.download("http://www.fastshare.cz/" + action, post={"code": captcha, "submit": u"stáhnout"}) + captcha = self.decryptCaptcha("http://www.fastshare.cz" + captcha_src) + self.download("http://www.fastshare.cz" + action, post={"code": captcha, "btn.x": 77, "btn.y": 18}) check = self.checkDownload({ "paralell_dl": - "<title>FastShare.cz</title>|<script>alert\('Pres FREE muzete stahovat jen jeden soubor najednou.'\)" + "<title>FastShare.cz</title>|<script>alert\('Pres FREE muzete stahovat jen jeden soubor najednou.'\)", + "wrong_captcha": "Download for FREE" }) - self.logDebug(self.req.lastEffectiveURL, self.req.lastURL, self.req.code) if check == "paralell_dl": - self.setWait(600, True) - self.wait() - self.retry(6, "Paralell download") + self.retry(6, 600, "Paralell download") + elif check == "wrong_captcha": + self.retry(5, 1, "Wrong captcha") def handlePremium(self): header = self.load(self.pyfile.url, just_header=True) @@ -90,7 +79,7 @@ class FastshareCz(SimpleHoster): url = found.group(1) self.logDebug("PREMIUM URL: %s" % url) - self.download(url) + self.download(url, disposition=True) check = self.checkDownload({"credit": re.compile(self.NOT_ENOUGH_CREDIC_PATTERN)}) if check == "credit": |