From fd105f8e51768ec1943cda2375bdfdbe5b0a3951 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 9 Jan 2015 00:35:51 +0100 Subject: "New Year" Update: hoster plugins --- module/plugins/hoster/AlldebridCom.py | 26 ++--- module/plugins/hoster/BasePlugin.py | 11 ++- module/plugins/hoster/BezvadataCz.py | 4 +- module/plugins/hoster/BitshareCom.py | 9 +- module/plugins/hoster/CatShareNet.py | 10 +- module/plugins/hoster/CloudzillaTo.py | 8 +- module/plugins/hoster/CrockoCom.py | 10 +- module/plugins/hoster/CzshareCom.py | 34 ++++--- module/plugins/hoster/DataHu.py | 12 +-- module/plugins/hoster/DataportCz.py | 10 +- module/plugins/hoster/DateiTo.py | 4 +- module/plugins/hoster/DebridItaliaCom.py | 10 +- module/plugins/hoster/DepositfilesCom.py | 20 ++-- module/plugins/hoster/DevhostSt.py | 17 +--- module/plugins/hoster/DlFreeFr.py | 6 +- module/plugins/hoster/DropboxCom.py | 10 +- module/plugins/hoster/EdiskCz.py | 6 +- module/plugins/hoster/EuroshareEu.py | 30 +++--- module/plugins/hoster/ExtabitCom.py | 12 +-- module/plugins/hoster/FastixRu.py | 20 ++-- module/plugins/hoster/FastshareCz.py | 16 +-- module/plugins/hoster/FileParadoxIn.py | 23 ----- module/plugins/hoster/FileSharkPl.py | 12 +-- module/plugins/hoster/FileStoreTo.py | 6 +- module/plugins/hoster/FilecloudIo.py | 37 +++---- module/plugins/hoster/FilefactoryCom.py | 31 +++--- module/plugins/hoster/FilepostCom.py | 4 +- module/plugins/hoster/FilepupNet.py | 12 +-- module/plugins/hoster/FilerNet.py | 8 +- module/plugins/hoster/FilesMailRu.py | 5 +- module/plugins/hoster/FileserveCom.py | 15 ++- module/plugins/hoster/FourSharedCom.py | 61 ------------ module/plugins/hoster/FreakshareCom.py | 12 ++- module/plugins/hoster/FreeWayMe.py | 10 +- module/plugins/hoster/FshareVn.py | 46 +++------ module/plugins/hoster/Ftp.py | 4 +- module/plugins/hoster/GigapetaCom.py | 6 +- module/plugins/hoster/GooIm.py | 8 +- module/plugins/hoster/HellshareCz.py | 37 +++---- module/plugins/hoster/HundredEightyUploadCom.py | 24 ----- module/plugins/hoster/IfileIt.py | 55 +---------- module/plugins/hoster/IfolderRu.py | 24 ++--- module/plugins/hoster/JumbofilesCom.py | 14 ++- module/plugins/hoster/KingfilesNet.py | 20 ++-- module/plugins/hoster/LetitbitNet.py | 30 ++++-- module/plugins/hoster/LinestorageCom.py | 21 ---- module/plugins/hoster/LinksnappyCom.py | 23 ++--- module/plugins/hoster/LoadTo.py | 20 +--- module/plugins/hoster/LuckyShareNet.py | 7 +- module/plugins/hoster/MediafireCom.py | 8 +- module/plugins/hoster/MegaDebridEu.py | 14 +-- module/plugins/hoster/MegaRapidCz.py | 18 ++-- module/plugins/hoster/MegacrypterCom.py | 13 +-- module/plugins/hoster/MegasharesCom.py | 6 +- module/plugins/hoster/MultihostersCom.py | 44 ++------- module/plugins/hoster/MultishareCz.py | 10 +- module/plugins/hoster/MyfastfileCom.py | 12 +-- module/plugins/hoster/NarodRu.py | 16 ++- module/plugins/hoster/NetloadIn.py | 6 +- module/plugins/hoster/NitroflareCom.py | 123 +++++++++++------------- module/plugins/hoster/NoPremiumPl.py | 118 +++++++++++------------ module/plugins/hoster/NowDownloadSx.py | 8 +- module/plugins/hoster/NowVideoSx.py | 4 +- module/plugins/hoster/OneFichierCom.py | 60 ------------ module/plugins/hoster/OverLoadMe.py | 29 +++--- module/plugins/hoster/PremiumTo.py | 19 ++-- module/plugins/hoster/PremiumizeMe.py | 14 +-- module/plugins/hoster/PromptfileCom.py | 12 +-- module/plugins/hoster/PutdriveCom.py | 15 +++ module/plugins/hoster/QuickshareCz.py | 13 ++- module/plugins/hoster/RPNetBiz.py | 12 +-- module/plugins/hoster/RapideoPl.py | 116 +++++++++++----------- module/plugins/hoster/RapidfileshareNet.py | 6 +- module/plugins/hoster/RapidgatorNet.py | 23 ++--- module/plugins/hoster/RapiduNet.py | 8 +- module/plugins/hoster/RealdebridCom.py | 29 +++--- module/plugins/hoster/RehostTo.py | 12 +-- module/plugins/hoster/RemixshareCom.py | 10 +- module/plugins/hoster/SendmywayCom.py | 21 ---- module/plugins/hoster/SendspaceCom.py | 10 +- module/plugins/hoster/ShareonlineBiz.py | 36 +++---- module/plugins/hoster/ShareplaceCom.py | 4 +- module/plugins/hoster/SimplyPremiumCom.py | 6 +- module/plugins/hoster/SimplydebridCom.py | 16 ++- module/plugins/hoster/SmoozedCom.py | 57 +++++------ module/plugins/hoster/SpeedyshareCom.py | 12 +-- module/plugins/hoster/TurbobitNet.py | 14 ++- module/plugins/hoster/TusfilesNet.py | 15 ++- module/plugins/hoster/TwoSharedCom.py | 41 -------- module/plugins/hoster/UlozTo.py | 39 +++----- module/plugins/hoster/UloziskoSk.py | 23 +++-- module/plugins/hoster/UnibytesCom.py | 14 ++- module/plugins/hoster/UnrestrictLi.py | 10 +- module/plugins/hoster/UpleaCom.py | 6 +- module/plugins/hoster/UploadableCh.py | 22 ++--- module/plugins/hoster/UploadheroCom.py | 19 ++-- module/plugins/hoster/UploadingCom.py | 27 +++--- module/plugins/hoster/UpstoreNet.py | 12 +-- module/plugins/hoster/VeohCom.py | 7 +- module/plugins/hoster/VimeoCom.py | 9 +- module/plugins/hoster/WebshareCz.py | 11 +-- module/plugins/hoster/WrzucTo.py | 8 +- module/plugins/hoster/XFileSharingPro.py | 19 ++-- module/plugins/hoster/YibaishiwuCom.py | 14 ++- module/plugins/hoster/YourfilesTo.py | 4 +- module/plugins/hoster/ZeveraCom.py | 35 ++++--- module/plugins/hoster/ZippyshareCom.py | 17 ++-- module/plugins/hoster/_1FichierCom.py | 60 ++++++++++++ module/plugins/hoster/_2SharedCom.py | 32 ++++++ module/plugins/hoster/_4SharedCom.py | 62 ++++++++++++ 110 files changed, 1030 insertions(+), 1290 deletions(-) delete mode 100644 module/plugins/hoster/FileParadoxIn.py delete mode 100644 module/plugins/hoster/FourSharedCom.py delete mode 100644 module/plugins/hoster/HundredEightyUploadCom.py delete mode 100644 module/plugins/hoster/LinestorageCom.py delete mode 100644 module/plugins/hoster/OneFichierCom.py create mode 100644 module/plugins/hoster/PutdriveCom.py delete mode 100644 module/plugins/hoster/SendmywayCom.py delete mode 100644 module/plugins/hoster/TwoSharedCom.py create mode 100644 module/plugins/hoster/_1FichierCom.py create mode 100644 module/plugins/hoster/_2SharedCom.py create mode 100644 module/plugins/hoster/_4SharedCom.py (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py index 751ff415c..4db32da5d 100644 --- a/module/plugins/hoster/AlldebridCom.py +++ b/module/plugins/hoster/AlldebridCom.py @@ -13,11 +13,11 @@ from module.utils import parseFileSize class AlldebridCom(MultiHoster): __name__ = "AlldebridCom" __type__ = "hoster" - __version__ = "0.42" + __version__ = "0.43" __pattern__ = r'https?://(?:www\.|s\d+\.)?alldebrid\.com/dl/[\w^_]+' - __description__ = """Alldebrid.com hoster plugin""" + __description__ = """Alldebrid.com multi-hoster plugin""" __license__ = "GPLv3" __authors__ = [("Andy Voigt", "spamsales@online.de")] @@ -38,11 +38,11 @@ class AlldebridCom(MultiHoster): self.chunkLimit = 16 - def handlePremium(self): + def handlePremium(self, pyfile): password = self.getPassword() data = json_loads(self.load("http://www.alldebrid.com/service.php", - get={'link': self.pyfile.url, 'json': "true", 'pw': password})) + get={'link': pyfile.url, 'json': "true", 'pw': password})) self.logDebug("Json data", data) @@ -53,9 +53,9 @@ class AlldebridCom(MultiHoster): self.logWarning(data['error']) self.tempOffline() else: - if self.pyfile.name and not self.pyfile.name.endswith('.tmp'): - self.pyfile.name = data['filename'] - self.pyfile.size = parseFileSize(data['filesize']) + if pyfile.name and not pyfile.name.endswith('.tmp'): + pyfile.name = data['filename'] + pyfile.size = parseFileSize(data['filesize']) self.link = data['link'] if self.getConfig("https"): @@ -63,19 +63,19 @@ class AlldebridCom(MultiHoster): else: self.link = self.link.replace("https://", "http://") - if self.link != self.pyfile.url: + if self.link != pyfile.url: self.logDebug("New URL: %s" % self.link) - if self.pyfile.name.startswith("http") or self.pyfile.name.startswith("Unknown"): + if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown"): #only use when name wasnt already set - self.pyfile.name = self.getFilename(self.link) + pyfile.name = self.getFilename(self.link) def checkFile(self): - super(AlldebridCom, self).checkFile() - - if self.checkDownload({'error': "An error occured while processing your request"}) is "error": + if self.checkDownload({'error': "An error occured while processing your request"}) == "error": self.retry(wait_time=60, reason=_("An error occured while generating link")) + return super(AlldebridCom, self).checkFile() + getInfo = create_getInfo(AlldebridCom) diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index d0d8e7cc8..32ba7094a 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -13,7 +13,7 @@ from module.plugins.Hoster import Hoster class BasePlugin(Hoster): __name__ = "BasePlugin" __type__ = "hoster" - __version__ = "0.26" + __version__ = "0.27" __pattern__ = r'^unmatchable$' @@ -58,7 +58,7 @@ class BasePlugin(Hoster): if server in servers: self.logDebug("Logging on to %s" % server) - self.req.addAuth(account.accounts[server]['password']) + self.req.addAuth(account.getAccountData(server)['password']) else: pwd = self.getPassword() if ':' in pwd: @@ -72,8 +72,11 @@ class BasePlugin(Hoster): else: self.fail(_("No file downloaded")) #@TODO: Move to hoster class in 0.4.10 - if self.checkDownload({'empty': re.compile(r"^$")}) is "empty": #@TODO: Move to hoster in 0.4.10 - self.fail(_("Empty file")) + check = self.checkDownload('empty file': re.compile(r'\A\Z'), + 'html file' : re.compile(r'\A\s*)?\d{3}(\Z|\s+)')}): + if check: + self.fail(check.capitalize()) def downloadFile(self, pyfile): diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index 9ca4b4b1a..8d56f1ff6 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class BezvadataCz(SimpleHoster): __name__ = "BezvadataCz" __type__ = "hoster" - __version__ = "0.25" + __version__ = "0.26" __pattern__ = r'http://(?:www\.)?bezvadata\.cz/stahnout/.+' @@ -27,7 +27,7 @@ class BezvadataCz(SimpleHoster): self.multiDL = True - def handleFree(self): + def handleFree(self, pyfile): #download button m = re.search(r'\w+)(?(1)/(?P.+?)\.html)' @@ -73,12 +73,7 @@ class BitshareCom(SimpleHoster): # This may either download our file or forward us to an error page self.download(self.getDownloadUrl()) - check = self.checkDownload({"404": ">404 Not Found<", "Error": ">Error occured<"}) - - if check == "404": - self.retry(3, 60, 'Error 404') - - elif check == "error": + if self.checkDownload({"error": ">Error occured<"}): self.retry(5, 5 * 60, "Bitshare host : Error occured") diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 949a021dd..f2ddd64a0 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class CatShareNet(SimpleHoster): __name__ = "CatShareNet" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}' @@ -27,7 +27,7 @@ class CatShareNet(SimpleHoster): IP_BLOCKED_PATTERN = ur'>Nasz serwis wykrył że Twój adres IP nie pochodzi z Polski.<' SECONDS_PATTERN = 'var\scount\s=\s(\d+);' - LINK_PATTERN = r'
' + LINK_FREE_PATTERN = r'' def setup(self): @@ -42,7 +42,7 @@ class CatShareNet(SimpleHoster): return super(CatShareNet, self).getFileInfo() - def handleFree(self): + def handleFree(self, pyfile): m = re.search(self.SECONDS_PATTERN, self.html) if m: wait_time = int(m.group(1)) @@ -51,11 +51,11 @@ class CatShareNet(SimpleHoster): recaptcha = ReCaptcha(self) challenge, response = recaptcha.challenge() - self.html = self.load(self.pyfile.url, + self.html = self.load(pyfile.url, post={'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) - m = re.search(self.LINK_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: self.invalidCaptcha() self.retry(reason=_("Wrong captcha entered")) diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py index d8b5e8b5d..58b1ac0dd 100644 --- a/module/plugins/hoster/CloudzillaTo.py +++ b/module/plugins/hoster/CloudzillaTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class CloudzillaTo(SimpleHoster): __name__ = "CloudzillaTo" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P[\w^_]+)' @@ -32,7 +32,7 @@ class CloudzillaTo(SimpleHoster): self.retry(reason="Wrong password") - def handleFree(self): + def handleFree(self, pyfile): self.html = self.load("http://www.cloudzilla.to/generateticket/", post={'file_id': self.info['pattern']['ID'], 'key': self.getPassword()}) @@ -54,8 +54,8 @@ class CloudzillaTo(SimpleHoster): 'ticket_id': ticket['ticket_id']} - def handlePremium(self): - return self.handleFree() + def handlePremium(self, pyfile): + return self.handleFree(pyfile) getInfo = create_getInfo(CloudzillaTo) diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index e5f94800b..31d0eec95 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class CrockoCom(SimpleHoster): __name__ = "CrockoCom" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __pattern__ = r'http://(?:www\.)?(crocko|easy-share)\.com/\w+' @@ -30,7 +30,7 @@ class CrockoCom(SimpleHoster): NAME_REPLACEMENTS = [(r'<[^>]*>', '')] - def handleFree(self): + def handleFree(self, pyfile): if "You need Premium membership to download this file." in self.html: self.fail(_("You need Premium membership to download this file")) @@ -55,11 +55,7 @@ class CrockoCom(SimpleHoster): inputs['recaptcha_challenge_field'], inputs['recaptcha_response_field'] = recaptcha.challenge() self.download(action, post=inputs) - check = self.checkDownload({ - "captcha_err": recaptcha.KEY_AJAX_PATTERN - }) - - if check == "captcha_err": + if self.checkDownload({"captcha": recaptcha.KEY_AJAX_PATTERN}): self.invalidCaptcha() else: break diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index aa381d712..fb9e7f457 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -12,7 +12,7 @@ from module.utils import parseFileSize class CzshareCom(SimpleHoster): __name__ = "CzshareCom" __type__ = "hoster" - __version__ = "0.96" + __version__ = "0.97" __pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/(\d+/|download\.php\?).+' @@ -63,7 +63,7 @@ class CzshareCom(SimpleHoster): return True - def handlePremium(self): + def handlePremium(self, pyfile): # parse download link try: form = re.search(self.PREMIUM_FORM_PATTERN, self.html, re.S).group(1) @@ -77,12 +77,14 @@ class CzshareCom(SimpleHoster): self.checkDownloadedFile() - def handleFree(self): + def handleFree(self, pyfile): # get free url m = re.search(self.FREE_URL_PATTERN, self.html) if m is None: self.error(_("FREE_URL_PATTERN not found")) + parsed_url = "http://sdilej.cz" + m.group(1) + self.logDebug("PARSED_URL:" + parsed_url) # get download ticket and parse html @@ -93,7 +95,8 @@ class CzshareCom(SimpleHoster): try: form = re.search(self.FREE_FORM_PATTERN, self.html, re.S).group(1) inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form)) - self.pyfile.size = int(inputs['size']) + pyfile.size = int(inputs['size']) + except Exception, e: self.logError(e) self.error(_("Form")) @@ -103,10 +106,13 @@ class CzshareCom(SimpleHoster): for _i in xrange(5): inputs['captchastring2'] = self.decryptCaptcha(captcha_url) self.html = self.load(parsed_url, cookies=True, post=inputs, decode=True) + if u"
  • Zadaný ověřovací kód nesouhlasí!
  • " in self.html: self.invalidCaptcha() + elif re.search(self.MULTIDL_PATTERN, self.html): self.longWait(5 * 60, 12) + else: self.correctCaptcha() break @@ -118,6 +124,7 @@ class CzshareCom(SimpleHoster): # download the file, destination is determined by pyLoad self.logDebug("WAIT URL", self.req.lastEffectiveURL) + m = re.search("free_wait.php\?server=(.*?)&(.*)", self.req.lastEffectiveURL) if m is None: self.error(_("Download URL not found")) @@ -132,19 +139,22 @@ class CzshareCom(SimpleHoster): def checkDownloadedFile(self): # check download check = self.checkDownload({ - "temp_offline": re.compile(r"^Soubor je do.*asn.* nedostupn.*$"), - "credit": re.compile(r"^Nem.*te dostate.*n.* kredit.$"), - "multi_dl": re.compile(self.MULTIDL_PATTERN), - "captcha_err": "
  • Zadaný ověřovací kód nesouhlasí!
  • " + "temp offline" : re.compile(r"^Soubor je do.*asn.* nedostupn.*$"), + "credit" : re.compile(r"^Nem.*te dostate.*n.* kredit.$"), + "multi-dl" : re.compile(self.MULTIDL_PATTERN), + "captcha" : "
  • Zadaný ověřovací kód nesouhlasí!
  • " }) - if check == "temp_offline": + if check == "temp offline": self.fail(_("File not available - try later")) - if check == "credit": + + elif check == "credit": self.resetAccount() - elif check == "multi_dl": + + elif check == "multi-dl": self.longWait(5 * 60, 12) - elif check == "captcha_err": + + elif check == "captcha": self.invalidCaptcha() self.retry() diff --git a/module/plugins/hoster/DataHu.py b/module/plugins/hoster/DataHu.py index 437fea7cd..f4b0692a8 100644 --- a/module/plugins/hoster/DataHu.py +++ b/module/plugins/hoster/DataHu.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DataHu(SimpleHoster): __name__ = "DataHu" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'http://(?:www\.)?data\.hu/get/\w+' @@ -23,7 +23,7 @@ class DataHu(SimpleHoster): INFO_PATTERN = ur'(?P<N>.*) \((?P<S>[^)]+)\) let\xf6lt\xe9se' OFFLINE_PATTERN = ur'Az adott f\xe1jl nem l\xe9tezik' - LINK_PATTERN = r'
    ' + LINK_FREE_PATTERN = r'
    ' def setup(self): @@ -31,12 +31,4 @@ class DataHu(SimpleHoster): self.multiDL = self.premium - def handleFree(self): - m = re.search(self.LINK_PATTERN, self.html) - if m is None: - self.error(_("LINK_PATTERN not found")) - - self.download(m.group(1), disposition=True) - - getInfo = create_getInfo(DataHu) diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py index 8e74f5553..266199616 100644 --- a/module/plugins/hoster/DataportCz.py +++ b/module/plugins/hoster/DataportCz.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DataportCz(SimpleHoster): __name__ = "DataportCz" __type__ = "hoster" - __version__ = "0.40" + __version__ = "0.41" __pattern__ = r'http://(?:www\.)?dataport\.cz/file/(.+)' @@ -23,7 +23,7 @@ class DataportCz(SimpleHoster): FREE_SLOTS_PATTERN = ur'Počet volných slotů: (\d+)
    ' - def handleFree(self): + def handleFree(self, pyfile): captchas = {"1": "jkeG", "2": "hMJQ", "3": "vmEK", "4": "ePQM", "5": "blBd"} for _i in xrange(60): @@ -40,14 +40,16 @@ class DataportCz(SimpleHoster): self.html = self.download("http://www.dataport.cz%s" % action, post=inputs) check = self.checkDownload({"captcha": 'alert("\u0160patn\u011b opsan\u00fd k\u00f3d z obr\u00e1zu");', - "slot": 'alert("Je n\u00e1m l\u00edto, ale moment\u00e1ln\u011b nejsou'}) + "slot" : 'alert("Je n\u00e1m l\u00edto, ale moment\u00e1ln\u011b nejsou'}) if check == "captcha": self.error(_("invalid captcha")) + elif check == "slot": self.logDebug("No free slots - wait 60s and retry") self.wait(60, False) - self.html = self.load(self.pyfile.url, decode=True) + self.html = self.load(pyfile.url, decode=True) continue + else: break diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py index e4bff8458..99b86e000 100644 --- a/module/plugins/hoster/DateiTo.py +++ b/module/plugins/hoster/DateiTo.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DateiTo(SimpleHoster): __name__ = "DateiTo" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?datei\.to/datei/(?P\w+)\.html' @@ -28,7 +28,7 @@ class DateiTo(SimpleHoster): DATA_PATTERN = r'url: "(.*?)", data: "(.*?)",' - def handleFree(self): + def handleFree(self, pyfile): url = 'http://datei.to/ajax/download.php' data = {'P': 'I', 'ID': self.info['pattern']['ID']} recaptcha = ReCaptcha(self) diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py index 11b6da918..8cda56c0c 100644 --- a/module/plugins/hoster/DebridItaliaCom.py +++ b/module/plugins/hoster/DebridItaliaCom.py @@ -8,11 +8,11 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class DebridItaliaCom(MultiHoster): __name__ = "DebridItaliaCom" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __pattern__ = r'https?://(?:www\.|s\d+\.)?debriditalia\.com/dl/\d+' - __description__ = """Debriditalia.com hoster plugin""" + __description__ = """Debriditalia.com multi-hoster plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it"), ("Walter Purcaro", "vuolter@gmail.com")] @@ -21,9 +21,9 @@ class DebridItaliaCom(MultiHoster): URL_REPLACEMENTS = [("https://", "http://")] - def handlePremium(self): + def handlePremium(self, pyfile): self.html = self.load("http://www.debriditalia.com/api.php", - get={'generate': "on", 'link': self.pyfile.url, 'p': self.getPassword()}) + get={'generate': "on", 'link': pyfile.url, 'p': self.getPassword()}) if "ERROR:" not in self.html: self.link = self.html.strip() @@ -32,7 +32,7 @@ class DebridItaliaCom(MultiHoster): self.html = self.load("http://debriditalia.com/linkgen2.php", post={'xjxfun' : "convertiLink", - 'xjxargs[]': "S" % self.pyfile.url, + 'xjxargs[]': "S" % pyfile.url, 'xjxargs[]': "S%s" % self.getPassword()}) try: self.link = re.search(r'
    \w+)' @@ -32,14 +32,12 @@ class DepositfilesCom(SimpleHoster): COOKIES = [("dfiles.eu", "lang_current", "en")] - FREE_LINK_PATTERN = r'' in self.html: self.logWarning(_("Download limit reached")) self.retry(25, 60 * 60, "Download limit reached") @@ -109,8 +107,8 @@ class DepositfilesCom(SimpleHoster): self.account.relogin(self.user) self.retry() else: - link = re.search(self.PREMIUM_LINK_PATTERN, self.html) - mirror = re.search(self.PREMIUM_MIRROR_PATTERN, self.html) + link = re.search(self.LINK_PREMIUM_PATTERN, self.html) + mirror = re.search(self.LINK_MIRROR_PATTERN, self.html) if link: dlink = link.group(1) elif mirror: diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index 85e36edb3..2a8734655 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DevhostSt(SimpleHoster): __name__ = "DevhostSt" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?d-h\.st/(?!users/)\w{3}' @@ -24,7 +24,7 @@ class DevhostSt(SimpleHoster): SIZE_PATTERN = r'>Size: (?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = r'>File Not Found<' - LINK_PATTERN = r'id="downloadfile" href="(.+?)"' + LINK_FREE_PATTERN = r'id="downloadfile" href="(.+?)"' def setup(self): @@ -32,17 +32,4 @@ class DevhostSt(SimpleHoster): self.chunkLimit = 1 - def handleFree(self): - m = re.search(self.LINK_PATTERN, self.html) - if m is None: - self.error(_("Download link not found")) - - dl_url = m.group(1) - self.download(dl_url, disposition=True) - - check = self.checkDownload({'html': re.compile("html")}) - if check == "html": - self.error(_("Downloaded file is an html page")) - - getInfo = create_getInfo(DevhostSt) diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py index 793c81b1c..ec40b64ce 100644 --- a/module/plugins/hoster/DlFreeFr.py +++ b/module/plugins/hoster/DlFreeFr.py @@ -36,7 +36,7 @@ class CustomBrowser(Browser): class DlFreeFr(SimpleHoster): __name__ = "DlFreeFr" __type__ = "hoster" - __version__ = "0.26" + __version__ = "0.27" __pattern__ = r'http://(?:www\.)?dl\.free\.fr/(\w+|getfile\.pl\?file=/\w+)' @@ -78,7 +78,7 @@ class DlFreeFr(SimpleHoster): if content_type and content_type.startswith("text/html"): # Undirect acces to requested file, with a web page providing it (captcha) self.html = self.load(valid_url) - self.handleFree() + self.handleFree(pyfile) else: # Direct access to requested file for users using free.fr as Internet Service Provider. self.download(valid_url, disposition=True) @@ -88,7 +88,7 @@ class DlFreeFr(SimpleHoster): self.fail(_("Invalid return code: ") + str(headers.get('code'))) - def handleFree(self): + def handleFree(self, pyfile): action, inputs = self.parseHtmlForm('action="getfile.pl"') adyoulike = AdYouLike(self) diff --git a/module/plugins/hoster/DropboxCom.py b/module/plugins/hoster/DropboxCom.py index 658974d13..a8ef5b4bc 100644 --- a/module/plugins/hoster/DropboxCom.py +++ b/module/plugins/hoster/DropboxCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DropboxCom(SimpleHoster): __name__ = "DropboxCom" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?dropbox\.com/.+' @@ -31,12 +31,8 @@ class DropboxCom(SimpleHoster): self.resumeDownload = True - def handleFree(self): - self.download(self.pyfile.url, get={'dl': "1"}) - - check = self.checkDownload({'html': re.compile("html")}) - if check == "html": - self.error(_("Downloaded file is an html page")) + def handleFree(self, pyfile): + self.download(pyfile.url, get={'dl': "1"}) getInfo = create_getInfo(DropboxCom) diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py index eb9338871..f8ccc972e 100644 --- a/module/plugins/hoster/EdiskCz.py +++ b/module/plugins/hoster/EdiskCz.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class EdiskCz(SimpleHoster): __name__ = "EdiskCz" __type__ = "hoster" - __version__ = "0.22" + __version__ = "0.23" __pattern__ = r'http://(?:www\.)?edisk\.(cz|sk|eu)/(stahni|sk/stahni|en/download)/.+' @@ -21,7 +21,7 @@ class EdiskCz(SimpleHoster): OFFLINE_PATTERN = r'

    This file does not exist due to one of the following: