From 0331df435b912d8abfc012d15fd8be9ae90ad78d Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 7 Dec 2014 16:03:18 +0100 Subject: Fix previous merge --- pyload/plugins/hoster/BitshareCom.py | 2 +- pyload/plugins/hoster/CatShareNet.py | 2 +- pyload/plugins/hoster/CrockoCom.py | 2 +- pyload/plugins/hoster/DateiTo.py | 2 +- pyload/plugins/hoster/DepositfilesCom.py | 2 +- pyload/plugins/hoster/DodanePl.py | 18 +++++++ pyload/plugins/hoster/ExtabitCom.py | 2 +- pyload/plugins/hoster/FilecloudIo.py | 2 +- pyload/plugins/hoster/FilepostCom.py | 2 +- pyload/plugins/hoster/FilerNet.py | 2 +- pyload/plugins/hoster/FileserveCom.py | 2 +- pyload/plugins/hoster/FreakshareCom.py | 2 +- pyload/plugins/hoster/IfileIt.py | 2 +- pyload/plugins/hoster/Keep2shareCc.py | 2 +- pyload/plugins/hoster/LetitbitNet.py | 2 +- pyload/plugins/hoster/LoadTo.py | 2 +- pyload/plugins/hoster/LuckyShareNet.py | 2 +- pyload/plugins/hoster/MediafireCom.py | 2 +- pyload/plugins/hoster/NowDownloadEu.py | 63 ---------------------- pyload/plugins/hoster/NowDownloadSx.py | 64 +++++++++++++++++++++++ pyload/plugins/hoster/NowVideoAt.py | 44 ---------------- pyload/plugins/hoster/NowVideoSx.py | 44 ++++++++++++++++ pyload/plugins/hoster/OboomCom.py | 2 +- pyload/plugins/hoster/RapidgatorNet.py | 2 +- pyload/plugins/hoster/RapiduNet.py | 82 +++++++++++++++++++++++++++++ pyload/plugins/hoster/RyushareCom.py | 2 +- pyload/plugins/hoster/SafesharingEu.py | 25 +++++++++ pyload/plugins/hoster/ShareonlineBiz.py | 6 +-- pyload/plugins/hoster/TurbobitNet.py | 2 +- pyload/plugins/hoster/UploadableCh.py | 90 ++++++++++++++++++++++++++++++++ pyload/plugins/hoster/UploadedTo.py | 2 +- pyload/plugins/hoster/UpstoreNet.py | 2 +- 32 files changed, 349 insertions(+), 133 deletions(-) create mode 100644 pyload/plugins/hoster/DodanePl.py delete mode 100644 pyload/plugins/hoster/NowDownloadEu.py create mode 100644 pyload/plugins/hoster/NowDownloadSx.py delete mode 100644 pyload/plugins/hoster/NowVideoAt.py create mode 100644 pyload/plugins/hoster/NowVideoSx.py create mode 100644 pyload/plugins/hoster/RapiduNet.py create mode 100644 pyload/plugins/hoster/SafesharingEu.py create mode 100644 pyload/plugins/hoster/UploadableCh.py (limited to 'pyload/plugins/hoster') diff --git a/pyload/plugins/hoster/BitshareCom.py b/pyload/plugins/hoster/BitshareCom.py index 02aa23036..0a6318c77 100644 --- a/pyload/plugins/hoster/BitshareCom.py +++ b/pyload/plugins/hoster/BitshareCom.py @@ -4,7 +4,7 @@ from __future__ import with_statement import re -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/pyload/plugins/hoster/CatShareNet.py b/pyload/plugins/hoster/CatShareNet.py index 089e137a0..63a550bd4 100644 --- a/pyload/plugins/hoster/CatShareNet.py +++ b/pyload/plugins/hoster/CatShareNet.py @@ -2,7 +2,7 @@ import re -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/pyload/plugins/hoster/CrockoCom.py b/pyload/plugins/hoster/CrockoCom.py index 6d86741d2..ea87cce6d 100644 --- a/pyload/plugins/hoster/CrockoCom.py +++ b/pyload/plugins/hoster/CrockoCom.py @@ -2,7 +2,7 @@ import re -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/pyload/plugins/hoster/DateiTo.py b/pyload/plugins/hoster/DateiTo.py index d22a0a3ce..bcd99ab0c 100644 --- a/pyload/plugins/hoster/DateiTo.py +++ b/pyload/plugins/hoster/DateiTo.py @@ -2,7 +2,7 @@ import re -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/pyload/plugins/hoster/DepositfilesCom.py b/pyload/plugins/hoster/DepositfilesCom.py index 001fee199..e78e0bb27 100644 --- a/pyload/plugins/hoster/DepositfilesCom.py +++ b/pyload/plugins/hoster/DepositfilesCom.py @@ -4,7 +4,7 @@ import re from urllib import unquote -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/pyload/plugins/hoster/DodanePl.py b/pyload/plugins/hoster/DodanePl.py new file mode 100644 index 000000000..3f1ea3d6d --- /dev/null +++ b/pyload/plugins/hoster/DodanePl.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.internal.DeadHoster import DeadHoster, create_getInfo + + +class DodanePl(DeadHoster): + __name__ = "DodanePl" + __type__ = "hoster" + __version__ = "0.03" + + __pattern__ = r'http://(?:www\.)?dodane\.pl/file/\d+' + + __description__ = """Dodane.pl hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("z00nx", "z00nx0@gmail.com")] + + +getInfo = create_getInfo(DodanePl) diff --git a/pyload/plugins/hoster/ExtabitCom.py b/pyload/plugins/hoster/ExtabitCom.py index 6c0dbd185..04f78dafb 100644 --- a/pyload/plugins/hoster/ExtabitCom.py +++ b/pyload/plugins/hoster/ExtabitCom.py @@ -5,7 +5,7 @@ import re from pyload.utils import json_loads from pyload.plugins.hoster.UnrestrictLi import secondsToMidnight -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/pyload/plugins/hoster/FilecloudIo.py b/pyload/plugins/hoster/FilecloudIo.py index 0c9f1b5ee..db1c0eee4 100644 --- a/pyload/plugins/hoster/FilecloudIo.py +++ b/pyload/plugins/hoster/FilecloudIo.py @@ -3,7 +3,7 @@ import re from pyload.utils import json_loads -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/pyload/plugins/hoster/FilepostCom.py b/pyload/plugins/hoster/FilepostCom.py index 5995b4aba..2948f3bc6 100644 --- a/pyload/plugins/hoster/FilepostCom.py +++ b/pyload/plugins/hoster/FilepostCom.py @@ -5,7 +5,7 @@ import re from time import time from pyload.utils import json_loads -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/pyload/plugins/hoster/FilerNet.py b/pyload/plugins/hoster/FilerNet.py index d73467947..04b04219f 100644 --- a/pyload/plugins/hoster/FilerNet.py +++ b/pyload/plugins/hoster/FilerNet.py @@ -8,7 +8,7 @@ import re from urlparse import urljoin -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/pyload/plugins/hoster/FileserveCom.py b/pyload/plugins/hoster/FileserveCom.py index 0d0833038..9be6e53ab 100644 --- a/pyload/plugins/hoster/FileserveCom.py +++ b/pyload/plugins/hoster/FileserveCom.py @@ -7,7 +7,7 @@ from pyload.network.RequestFactory import getURL from pyload.plugins.internal.Hoster import Hoster from pyload.plugins.Plugin import chunks from pyload.plugins.hoster.UnrestrictLi import secondsToMidnight -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.utils import parseFileSize diff --git a/pyload/plugins/hoster/FreakshareCom.py b/pyload/plugins/hoster/FreakshareCom.py index c298e5a24..ba4b7ddb0 100644 --- a/pyload/plugins/hoster/FreakshareCom.py +++ b/pyload/plugins/hoster/FreakshareCom.py @@ -4,7 +4,7 @@ import re from pyload.plugins.internal.Hoster import Hoster from pyload.plugins.hoster.UnrestrictLi import secondsToMidnight -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha class FreakshareCom(Hoster): diff --git a/pyload/plugins/hoster/IfileIt.py b/pyload/plugins/hoster/IfileIt.py index 75c2f115c..b96734159 100644 --- a/pyload/plugins/hoster/IfileIt.py +++ b/pyload/plugins/hoster/IfileIt.py @@ -3,7 +3,7 @@ import re from pyload.utils import json_loads -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/pyload/plugins/hoster/Keep2shareCc.py b/pyload/plugins/hoster/Keep2shareCc.py index 6fef901d8..44587c946 100644 --- a/pyload/plugins/hoster/Keep2shareCc.py +++ b/pyload/plugins/hoster/Keep2shareCc.py @@ -4,7 +4,7 @@ import re from urlparse import urljoin, urlparse -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import _isDirectLink, SimpleHoster, create_getInfo diff --git a/pyload/plugins/hoster/LetitbitNet.py b/pyload/plugins/hoster/LetitbitNet.py index cdd339eb9..e13fe8a66 100644 --- a/pyload/plugins/hoster/LetitbitNet.py +++ b/pyload/plugins/hoster/LetitbitNet.py @@ -13,7 +13,7 @@ from urlparse import urljoin from pyload.utils import json_loads, json_dumps from pyload.plugins.hoster.UnrestrictLi import secondsToMidnight -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import SimpleHoster diff --git a/pyload/plugins/hoster/LoadTo.py b/pyload/plugins/hoster/LoadTo.py index 3b7229a0b..af6c8b48e 100644 --- a/pyload/plugins/hoster/LoadTo.py +++ b/pyload/plugins/hoster/LoadTo.py @@ -6,7 +6,7 @@ import re -from pyload.plugins.internal.CaptchaService import SolveMedia +from pyload.plugins.internal.captcha import SolveMedia from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/pyload/plugins/hoster/LuckyShareNet.py b/pyload/plugins/hoster/LuckyShareNet.py index 9b418ccd4..a32ac6be9 100644 --- a/pyload/plugins/hoster/LuckyShareNet.py +++ b/pyload/plugins/hoster/LuckyShareNet.py @@ -4,7 +4,7 @@ import re from bottle import json_loads -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo diff --git a/pyload/plugins/hoster/MediafireCom.py b/pyload/plugins/hoster/MediafireCom.py index 246a5c87e..00e1e83cd 100644 --- a/pyload/plugins/hoster/MediafireCom.py +++ b/pyload/plugins/hoster/MediafireCom.py @@ -2,7 +2,7 @@ import re -from pyload.plugins.internal.CaptchaService import SolveMedia +from pyload.plugins.internal.captcha import SolveMedia from pyload.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo from pyload.network.RequestFactory import getURL diff --git a/pyload/plugins/hoster/NowDownloadEu.py b/pyload/plugins/hoster/NowDownloadEu.py deleted file mode 100644 index 2b1b8bc0a..000000000 --- a/pyload/plugins/hoster/NowDownloadEu.py +++ /dev/null @@ -1,63 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -from pyload.utils import fixup - - -class NowDownloadEu(SimpleHoster): - __name__ = "NowDownloadEu" - __type__ = "hoster" - __version__ = "0.05" - - __pattern__ = r'http://(?:www\.)?nowdownload\.(at|ch|co|eu|sx)/(dl/|download\.php\?id=)\w+' - - __description__ = """NowDownload.at hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("godofdream", "soilfiction@gmail.com"), - ("Walter Purcaro", "vuolter@gmail.com")] - - - INFO_PATTERN = r'Downloading
(?P.*) (?P[\d.,]+) (?P[\w^_]+) ' - OFFLINE_PATTERN = r'>This file does not exist' - - TOKEN_PATTERN = r'"(/api/token\.php\?token=\w+)"' - CONTINUE_PATTERN = r'"(/dl2/\w+/\w+)"' - WAIT_PATTERN = r'\.countdown\(\{until: \+(\d+),' - LINK_PATTERN = r'"(http://f\d+\.nowdownload\.at/dl/\w+/\w+)' - - NAME_REPLACEMENTS = [("&#?\w+;", fixup), (r'<[^>]*>', '')] - - - def setup(self): - self.multiDL = self.resumeDownload = True - self.chunkLimit = -1 - - - def handleFree(self): - tokenlink = re.search(self.TOKEN_PATTERN, self.html) - continuelink = re.search(self.CONTINUE_PATTERN, self.html) - if tokenlink is None or continuelink is None: - self.error() - - m = re.search(self.WAIT_PATTERN, self.html) - if m: - wait = int(m.group(1)) - else: - wait = 60 - - baseurl = "http://www.nowdownload.at" - self.html = self.load(baseurl + str(tokenlink.group(1))) - self.wait(wait) - - self.html = self.load(baseurl + str(continuelink.group(1))) - - url = re.search(self.LINK_PATTERN, self.html) - if url is None: - self.error(_("Download link not found")) - - self.download(str(url.group(1))) - - -getInfo = create_getInfo(NowDownloadEu) diff --git a/pyload/plugins/hoster/NowDownloadSx.py b/pyload/plugins/hoster/NowDownloadSx.py new file mode 100644 index 000000000..1574de012 --- /dev/null +++ b/pyload/plugins/hoster/NowDownloadSx.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- + +import re + +from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from pyload.utils import fixup + + +class NowDownloadSx(SimpleHoster): + __name__ = "NowDownloadSx" + __type__ = "hoster" + __version__ = "0.05" + + __pattern__ = r'http://(?:www\.)?nowdownload\.(at|ch|co|eu|sx)/(dl/|download\.php\?id=)\w+' + + __description__ = """NowDownload.sx hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("godofdream", "soilfiction@gmail.com"), + ("Walter Purcaro", "vuolter@gmail.com")] + + + INFO_PATTERN = r'Downloading
(?P.*) (?P[\d.,]+) (?P[\w^_]+) ' + OFFLINE_PATTERN = r'>This file does not exist' + + TOKEN_PATTERN = r'"(/api/token\.php\?token=\w+)"' + CONTINUE_PATTERN = r'"(/dl2/\w+/\w+)"' + WAIT_PATTERN = r'\.countdown\(\{until: \+(\d+),' + LINK_PATTERN = r'(http://s\d+\.coolcdn\.info/nowdownload/.+?)["\']' + + NAME_REPLACEMENTS = [("&#?\w+;", fixup), (r'<[^>]*>', '')] + + + def setup(self): + self.resumeDownload = True + self.multiDL = True + self.chunkLimit = -1 + + + def handleFree(self): + tokenlink = re.search(self.TOKEN_PATTERN, self.html) + continuelink = re.search(self.CONTINUE_PATTERN, self.html) + if tokenlink is None or continuelink is None: + self.error() + + m = re.search(self.WAIT_PATTERN, self.html) + if m: + wait = int(m.group(1)) + else: + wait = 60 + + baseurl = "http://www.nowdownload.at" + self.html = self.load(baseurl + str(tokenlink.group(1))) + self.wait(wait) + + self.html = self.load(baseurl + str(continuelink.group(1))) + + url = re.search(self.LINK_PATTERN, self.html) + if url is None: + self.error(_("Download link not found")) + + self.download(str(url.group(1))) + + +getInfo = create_getInfo(NowDownloadSx) diff --git a/pyload/plugins/hoster/NowVideoAt.py b/pyload/plugins/hoster/NowVideoAt.py deleted file mode 100644 index 1ac9d19a3..000000000 --- a/pyload/plugins/hoster/NowVideoAt.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo - - -class NowVideoAt(SimpleHoster): - __name__ = "NowVideoAt" - __type__ = "hoster" - __version__ = "0.06" - - __pattern__ = r'http://(?:www\.)?nowvideo\.(at|ch|co|eu|sx)/(video|mobile/#/videos)/(?P\w+)' - - __description__ = """NowVideo.at hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - - - URL_REPLACEMENTS = [(__pattern__ + ".*", r'http://www.nowvideo.at/video/\g')] - - NAME_PATTERN = r'

(?P.+?)<' - OFFLINE_PATTERN = r'>This file no longer exists' - - LINK_FREE_PATTERN = r'\s*\w+)' + + __description__ = """NowVideo.sx hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + + + URL_REPLACEMENTS = [(__pattern__ + ".*", r'http://www.nowvideo.at/video/\g')] + + NAME_PATTERN = r'

(?P.+?)<' + OFFLINE_PATTERN = r'>This file no longer exists' + + LINK_FREE_PATTERN = r'\s*\d{10})' + + __description__ = """Rapidu.net hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("prOq", None)] + + + COOKIES = [("rapidu.net", "rapidu_lang", "en")] + + FILE_INFO_PATTERN = r'

.*

\s*(?P\d+(\.\d+)?)\s(?P\w+)' + OFFLINE_PATTERN = r'404 - File not found' + + ERROR_PATTERN = r'
' + + RECAPTCHA_KEY = r'6Ld12ewSAAAAAHoE6WVP_pSfCdJcBQScVweQh8Io' + + + def setup(self): + self.resumeDownload = True + self.multiDL = True + self.limitDL = 0 if self.premium else 2 + + + def handleFree(self): + self.req.http.lastURL = self.pyfile.url + self.req.http.c.setopt(HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) + + jsvars = self.getJsonResponse("https://rapidu.net/ajax.php?a=getLoadTimeToDownload", {'_go': None}) + + if str(jsvars['timeToDownload']) is "stop": + t = (24 * 60 * 60) - (int(time()) % (24 *60 * 60)) + altzone + + self.logInfo("You've reach your daily download transfer") + + self.retry(10, 10 if t < 1 else None, "Try tomorrow again") #@NOTE: check t in case of not synchronised clock + + else: + self.wait(int(jsvars['timeToDownload']) - int(time())) + + recaptcha = ReCaptcha(self) + + for _i in xrange(10): + challenge, code = recaptcha.challenge(self.RECAPTCHA_KEY) + + jsvars = self.getJsonResponse("https://rapidu.net/ajax.php?a=getCheckCaptcha", + {'_go' : None, + 'captcha1': challenge, + 'captcha2': code, + 'fileId' : self.info['ID']}) + if jsvars['message'] == 'success': + self.download(jsvars['url']) + break + + + def getJsonResponse(self, url, post_data): + response = self.load(url, post=post_data, decode=True) + if not response.startswith('{'): + self.retry() + + self.logDebug(url, response) + + return json_loads(response) + + +getInfo = create_getInfo(RapiduNet) diff --git a/pyload/plugins/hoster/RyushareCom.py b/pyload/plugins/hoster/RyushareCom.py index ab6bf1017..8b08c9f51 100644 --- a/pyload/plugins/hoster/RyushareCom.py +++ b/pyload/plugins/hoster/RyushareCom.py @@ -6,7 +6,7 @@ import re from pyload.plugins.internal.XFSHoster import XFSHoster, create_getInfo -from pyload.plugins.internal.CaptchaService import SolveMedia +from pyload.plugins.internal.captcha import SolveMedia class RyushareCom(XFSHoster): diff --git a/pyload/plugins/hoster/SafesharingEu.py b/pyload/plugins/hoster/SafesharingEu.py new file mode 100644 index 000000000..730bfc692 --- /dev/null +++ b/pyload/plugins/hoster/SafesharingEu.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.internal.XFSHoster import XFSHoster, create_getInfo + + +class SafesharingEu(XFSHoster): + __name__ = "SafesharingEu" + __type__ = "hoster" + __version__ = "0.05" + + __pattern__ = r'https?://(?:www\.)?safesharing\.eu/\w{12}' + + __description__ = """Safesharing.eu hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] + + + HOSTER_DOMAIN = "safesharing.eu" + + WAIT_PATTERN = r'You have to wait (\d+) minutes' + + ERROR_PATTERN = r'(?:
)(.+?)(?:
)' + + +getInfo = create_getInfo(SafesharingEu) diff --git a/pyload/plugins/hoster/ShareonlineBiz.py b/pyload/plugins/hoster/ShareonlineBiz.py index 1cb651b12..df89f7bed 100644 --- a/pyload/plugins/hoster/ShareonlineBiz.py +++ b/pyload/plugins/hoster/ShareonlineBiz.py @@ -6,9 +6,9 @@ from time import time from urllib import unquote from urlparse import urlparse -from module.network.RequestFactory import getURL -from module.plugins.internal.CaptchaService import ReCaptcha -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from pyload.network.RequestFactory import getURL +from pyload.plugins.captcha import ReCaptcha +from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ShareonlineBiz(SimpleHoster): diff --git a/pyload/plugins/hoster/TurbobitNet.py b/pyload/plugins/hoster/TurbobitNet.py index 70844cadb..adb9d21a7 100644 --- a/pyload/plugins/hoster/TurbobitNet.py +++ b/pyload/plugins/hoster/TurbobitNet.py @@ -10,7 +10,7 @@ from pycurl import HTTPHEADER from urllib import quote from pyload.network.RequestFactory import getURL -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, timestamp diff --git a/pyload/plugins/hoster/UploadableCh.py b/pyload/plugins/hoster/UploadableCh.py new file mode 100644 index 000000000..0db7196bc --- /dev/null +++ b/pyload/plugins/hoster/UploadableCh.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- + +import re + +from time import sleep + +from pyload.plugins.captcha import ReCaptcha +from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class UploadableCh(SimpleHoster): + __name__ = "UploadableCh" + __type__ = "hoster" + __version__ = "0.02" + + __pattern__ = r'http://(?:www\.)?uploadable\.ch/file/(?P\w+)' + + __description__ = """Uploadable.ch hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de"), + ("Walter Purcaro", "vuolter@gmail.com")] + + + FILE_INFO_PATTERN = r'div id=\"file_name\" title=.*>(?P.+)\((?P[\d.]+) (?P\w+)\)<' + + OFFLINE_PATTERN = r'>(File not available|This file is no longer available)' + TEMP_OFFLINE_PATTERN = r'
' + + WAIT_PATTERN = r'data-time="(\d+)" data-format' + + FILE_URL_REPLACEMENTS = [(__pattern__ + ".*", r'http://www.uploadable.ch/file/\g')] + + + def setup(self): + self.multiDL = False + self.chunkLimit = 1 + + + def handleFree(self): + # Click the "free user" button and wait + a = self.load(self.pyfile.url, cookies=True, post={'downloadLink': "wait"}, decode=True) + self.logDebug(a) + + m = re.search(self.WAIT_PATTERN, a) + if m is not None: + self.wait(int(m.group(1))) #: Expected output: {"waitTime":30} + else: + self.error("WAIT_PATTERN") + + # Make the recaptcha appear and show it the pyload interface + b = self.load(self.pyfile.url, cookies=True, post={'checkDownload': "check"}, decode=True) + self.logDebug(b) #: Expected output: {"success":"showCaptcha"} + + recaptcha = ReCaptcha(self) + + challenge, captcha = recaptcha.challenge(self.RECAPTCHA_KEY) + + # Submit the captcha solution + self.load("http://www.uploadable.ch/checkReCaptcha.php", + cookies=True, + post={'recaptcha_challenge_field' : challenge, + 'recaptcha_response_field' : captcha, + 'recaptcha_shortencode_field': self.info['ID']}, + decode=True) + + self.wait(3) + + # Get ready for downloading + self.load(self.pyfile.url, cookies=True, post={'downloadLink': "show"}, decode=True) + + self.wait(3) + + # Download the file + self.download(self.pyfile.url, cookies=True, post={'download': "normal"}, disposition=True) + + + def checkFile(self): + check = self.checkDownload({'wait_or_reconnect': re.compile("Please wait for"), + 'is_html' : re.compile("")}) + + if check == "wait_or_reconnect": + self.logInfo("Downloadlimit reached, please wait or reconnect") + self.wait(60 * 60, True) + self.retry() + + elif check == "is_html": + self.error("Downloaded file is an html file") + + +getInfo = create_getInfo(UploadableCh) diff --git a/pyload/plugins/hoster/UploadedTo.py b/pyload/plugins/hoster/UploadedTo.py index ea55c3398..016f2c9cf 100644 --- a/pyload/plugins/hoster/UploadedTo.py +++ b/pyload/plugins/hoster/UploadedTo.py @@ -11,7 +11,7 @@ from time import sleep from pyload.network.RequestFactory import getURL from pyload.plugins.internal.Hoster import Hoster from pyload.plugins.Plugin import chunks -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.utils import html_unescape, parseFileSize diff --git a/pyload/plugins/hoster/UpstoreNet.py b/pyload/plugins/hoster/UpstoreNet.py index 328b42b12..bd4241532 100644 --- a/pyload/plugins/hoster/UpstoreNet.py +++ b/pyload/plugins/hoster/UpstoreNet.py @@ -2,7 +2,7 @@ import re -from pyload.plugins.internal.CaptchaService import ReCaptcha +from pyload.plugins.internal.captcha import ReCaptcha from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -- cgit v1.2.3