diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-10 16:54:05 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-10 16:54:05 +0100 |
commit | 3b64c8c07f2a331db66e6af6b5f617e6630d7b44 (patch) | |
tree | 0b071af35a7677f36895ec1dd8333f4ef56c79d8 /pyload | |
parent | License cleanup (diff) | |
parent | [CaptchaService] New service AdYouLike + AdsCaptcha detect_key fixup (diff) | |
download | pyload-3b64c8c07f2a331db66e6af6b5f617e6630d7b44.tar.xz |
Merge branch 'stable' into 0.4.10
Conflicts:
module/plugins/hooks/ClickAndLoad.py
module/plugins/internal/CaptchaService.py
pyload/plugins/addon/Checksum.py
pyload/plugins/addon/DownloadScheduler.py
pyload/plugins/addon/ExternalScripts.py
pyload/plugins/addon/ExtractArchive.py
pyload/plugins/addon/IRCInterface.py
pyload/plugins/addon/MergeFiles.py
pyload/plugins/addon/MultiHome.py
pyload/plugins/addon/SkipRev.py
pyload/plugins/addon/UnSkipOnFail.py
pyload/plugins/addon/WindowsPhoneToastNotify.py
pyload/plugins/container/CCF.py
pyload/plugins/hook/BypassCaptcha.py
pyload/plugins/hook/Captcha9kw.py
pyload/plugins/hook/CaptchaBrotherhood.py
pyload/plugins/hook/DeathByCaptcha.py
pyload/plugins/hook/ExpertDecoders.py
pyload/plugins/hook/ImageTyperz.py
pyload/plugins/hoster/DlFreeFr.py
pyload/plugins/internal/OCR.py
Diffstat (limited to 'pyload')
88 files changed, 343 insertions, 313 deletions
diff --git a/pyload/plugins/account/DepositfilesCom.py b/pyload/plugins/account/DepositfilesCom.py index df3ebe4f2..688fcc505 100644 --- a/pyload/plugins/account/DepositfilesCom.py +++ b/pyload/plugins/account/DepositfilesCom.py @@ -10,7 +10,7 @@ from pyload.plugins.internal.Account import Account class DepositfilesCom(Account): __name__ = "DepositfilesCom" __type__ = "account" - __version__ = "0.3" + __version__ = "0.30" __description__ = """Depositfiles.com account plugin""" __license__ = "GPLv3" diff --git a/pyload/plugins/account/FilesMailRu.py b/pyload/plugins/account/FilesMailRu.py index bfd9d7ffb..b42a7c559 100644 --- a/pyload/plugins/account/FilesMailRu.py +++ b/pyload/plugins/account/FilesMailRu.py @@ -6,7 +6,7 @@ from pyload.plugins.internal.Account import Account class FilesMailRu(Account): __name__ = "FilesMailRu" __type__ = "account" - __version__ = "0.1" + __version__ = "0.10" __description__ = """Filesmail.ru account plugin""" __license__ = "GPLv3" diff --git a/pyload/plugins/account/FileserveCom.py b/pyload/plugins/account/FileserveCom.py index 5a014ab03..8c570b575 100644 --- a/pyload/plugins/account/FileserveCom.py +++ b/pyload/plugins/account/FileserveCom.py @@ -9,7 +9,7 @@ from pyload.utils import json_loads class FileserveCom(Account): __name__ = "FileserveCom" __type__ = "account" - __version__ = "0.2" + __version__ = "0.20" __description__ = """Fileserve.com account plugin""" __license__ = "GPLv3" diff --git a/pyload/plugins/account/KingfilesNet.py b/pyload/plugins/account/KingfilesNet.py index d49c7a320..b2d7d122a 100644 --- a/pyload/plugins/account/KingfilesNet.py +++ b/pyload/plugins/account/KingfilesNet.py @@ -36,17 +36,17 @@ class KingfilesNet(SimpleHoster): def handleFree(self): # Click the free user button - post_data = {'op': "download1", - 'usr_login': "", - 'id': self.info['pattern']['ID'], - 'fname': self.pyfile.name, - 'referer': "", + post_data = {'op' : "download1", + 'usr_login' : "", + 'id' : self.info['pattern']['ID'], + 'fname' : self.pyfile.name, + 'referer' : "", 'method_free': "+"} self.html = self.load(self.pyfile.url, post=post_data, cookies=True, decode=True) solvemedia = SolveMedia(self) - captcha_challenge, captcha_response = solvemedia.challenge() + challenge, response = solvemedia.challenge() # Make the downloadlink appear and load the file m = re.search(self.RAND_ID_PATTERN, self.html) @@ -56,15 +56,15 @@ class KingfilesNet(SimpleHoster): rand = m.group(1) self.logDebug("rand = ", rand) - post_data = {'op': "download2", - 'id': self.info['pattern']['ID'], - 'rand': rand, - 'referer': self.pyfile.url, - 'method_free': "+", - 'method_premium': "", - 'adcopy_response': captcha_response, - 'adcopy_challenge': captcha_challenge, - 'down_direct': "1"} + post_data = {'op' : "download2", + 'id' : self.info['pattern']['ID'], + 'rand' : rand, + 'referer' : self.pyfile.url, + 'method_free' : "+", + 'method_premium' : "", + 'adcopy_response' : response, + 'adcopy_challenge': challenge, + 'down_direct' : "1"} self.html = self.load(self.pyfile.url, post=post_data, cookies=True, decode=True) diff --git a/pyload/plugins/account/MegaDebridEu.py b/pyload/plugins/account/MegaDebridEu.py index 3db0caa35..390cc232e 100644 --- a/pyload/plugins/account/MegaDebridEu.py +++ b/pyload/plugins/account/MegaDebridEu.py @@ -7,7 +7,7 @@ from pyload.utils import json_loads class MegaDebridEu(Account): __name__ = "MegaDebridEu" __type__ = "account" - __version__ = "0.2" + __version__ = "0.20" __description__ = """mega-debrid.eu account plugin""" __license__ = "GPLv3" diff --git a/pyload/plugins/account/RPNetBiz.py b/pyload/plugins/account/RPNetBiz.py index 417ca14a4..70622ff45 100644 --- a/pyload/plugins/account/RPNetBiz.py +++ b/pyload/plugins/account/RPNetBiz.py @@ -7,7 +7,7 @@ from pyload.utils import json_loads class RPNetBiz(Account): __name__ = "RPNetBiz" __type__ = "account" - __version__ = "0.1" + __version__ = "0.10" __description__ = """RPNet.biz account plugin""" __license__ = "GPLv3" diff --git a/pyload/plugins/account/RehostTo.py b/pyload/plugins/account/RehostTo.py index 070cdda3a..23c1eeda1 100644 --- a/pyload/plugins/account/RehostTo.py +++ b/pyload/plugins/account/RehostTo.py @@ -6,7 +6,7 @@ from pyload.plugins.internal.Account import Account class RehostTo(Account): __name__ = "RehostTo" __type__ = "account" - __version__ = "0.1" + __version__ = "0.10" __description__ = """Rehost.to account plugin""" __license__ = "GPLv3" diff --git a/pyload/plugins/account/SimplydebridCom.py b/pyload/plugins/account/SimplydebridCom.py index 636828146..1942e178c 100644 --- a/pyload/plugins/account/SimplydebridCom.py +++ b/pyload/plugins/account/SimplydebridCom.py @@ -8,7 +8,7 @@ from pyload.plugins.internal.Account import Account class SimplydebridCom(Account): __name__ = "SimplydebridCom" __type__ = "account" - __version__ = "0.1" + __version__ = "0.10" __description__ = """Simply-Debrid.com account plugin""" __license__ = "GPLv3" diff --git a/pyload/plugins/account/UploadheroCom.py b/pyload/plugins/account/UploadheroCom.py index be1d444be..9406de38f 100644 --- a/pyload/plugins/account/UploadheroCom.py +++ b/pyload/plugins/account/UploadheroCom.py @@ -10,7 +10,7 @@ from pyload.plugins.internal.Account import Account class UploadheroCom(Account): __name__ = "UploadheroCom" __type__ = "account" - __version__ = "0.2" + __version__ = "0.20" __description__ = """Uploadhero.co account plugin""" __license__ = "GPLv3" diff --git a/pyload/plugins/addon/Checksum.py b/pyload/plugins/addon/Checksum.py index 84024ce83..11154ac0f 100644 --- a/pyload/plugins/addon/Checksum.py +++ b/pyload/plugins/addon/Checksum.py @@ -40,7 +40,7 @@ def computeChecksum(local_file, algorithm): class Checksum(Addon): __name__ = "Checksum" __type__ = "addon" - __version__ = "0.14" + __version__ = "0.15" __config__ = [("activated" , "bool" , "Activated" , True ), ("check_checksum", "bool" , "Check checksum? (If False only size will be verified)", True ), @@ -63,6 +63,11 @@ class Checksum(Addon): 'default': r'^(?P<hash>[0-9A-Fa-f]+)\s+\*?(?P<name>.+)$'} + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def coreReady(self): if not self.getConfig("check_checksum"): self.logInfo(_("Checksum validation is disabled in plugin configuration")) diff --git a/pyload/plugins/addon/DownloadScheduler.py b/pyload/plugins/addon/DownloadScheduler.py index a35bba04e..ba7b14467 100644 --- a/pyload/plugins/addon/DownloadScheduler.py +++ b/pyload/plugins/addon/DownloadScheduler.py @@ -10,7 +10,7 @@ from pyload.plugins.internal.Addon import Addon class DownloadScheduler(Addon): __name__ = "DownloadScheduler" __type__ = "addon" - __version__ = "0.21" + __version__ = "0.22" __config__ = [("timetable", "str" , "List time periods as hh:mm full or number(kB/s)" , "0:00 full, 7:00 250, 10:00 0, 17:00 150"), ("abort" , "bool", "Abort active downloads when start period with speed 0", False )] @@ -21,6 +21,11 @@ class DownloadScheduler(Addon): ("stickell", "l.stickell@yahoo.it")] + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def setup(self): self.cb = None #: callback to scheduler job; will be by removed AddonManager when addon unloaded diff --git a/pyload/plugins/addon/ExternalScripts.py b/pyload/plugins/addon/ExternalScripts.py index 05aeecff6..1360e52de 100644 --- a/pyload/plugins/addon/ExternalScripts.py +++ b/pyload/plugins/addon/ExternalScripts.py @@ -13,7 +13,7 @@ from pyload.utils import safe_join class ExternalScripts(Addon): __name__ = "ExternalScripts" __type__ = "addon" - __version__ = "0.24" + __version__ = "0.25" __config__ = [("activated", "bool", "Activated", True)] @@ -29,6 +29,11 @@ class ExternalScripts(Addon): "allDownloadsFinished", "allDownloadsProcessed"] + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def setup(self): self.scripts = {} diff --git a/pyload/plugins/addon/ExtractArchive.py b/pyload/plugins/addon/ExtractArchive.py index eef8f00ef..938de0447 100644 --- a/pyload/plugins/addon/ExtractArchive.py +++ b/pyload/plugins/addon/ExtractArchive.py @@ -59,7 +59,7 @@ from pyload.utils import safe_join, fs_encode class ExtractArchive(Addon): __name__ = "ExtractArchive" __type__ = "addon" - __version__ = "0.18" + __version__ = "0.19" __config__ = [("activated" , "bool" , "Activated" , True ), ("fullpath" , "bool" , "Extract full path" , True ), @@ -83,6 +83,11 @@ class ExtractArchive(Addon): event_list = ["allDownloadsProcessed"] + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def setup(self): self.plugins = [] self.passwords = [] diff --git a/pyload/plugins/addon/IRCInterface.py b/pyload/plugins/addon/IRCInterface.py index 5b3178852..5392b01a8 100644 --- a/pyload/plugins/addon/IRCInterface.py +++ b/pyload/plugins/addon/IRCInterface.py @@ -20,10 +20,9 @@ from pyload.utils import formatSize class IRCInterface(Thread, Addon): __name__ = "IRCInterface" __type__ = "addon" - __version__ = "0.12" + __version__ = "0.13" - __config__ = [("activated", "bool", "Activated", False), - ("host" , "str" , "IRC-Server Address" , "Enter your server here!"), + __config__ = [("host" , "str" , "IRC-Server Address" , "Enter your server here!"), ("port" , "int" , "IRC-Server Port" , 6667 ), ("ident" , "str" , "Clients ident" , "pyload-irc" ), ("realname" , "str" , "Realname" , "pyload-irc" ), @@ -45,6 +44,11 @@ class IRCInterface(Thread, Addon): self.setDaemon(True) + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def coreReady(self): self.abort = False self.more = [] diff --git a/pyload/plugins/addon/MergeFiles.py b/pyload/plugins/addon/MergeFiles.py index 2483135f4..2efc221dc 100644 --- a/pyload/plugins/addon/MergeFiles.py +++ b/pyload/plugins/addon/MergeFiles.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- +from __future__ import with_statement + import os import re @@ -12,7 +14,7 @@ from pyload.utils import safe_join, fs_encode class MergeFiles(Addon): __name__ = "MergeFiles" __type__ = "addon" - __version__ = "0.12" + __version__ = "0.13" __config__ = [("activated", "bool", "Activated", True)] @@ -24,6 +26,11 @@ class MergeFiles(Addon): BUFFER_SIZE = 4096 + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def setup(self): # nothing to do pass @@ -48,36 +55,37 @@ class MergeFiles(Addon): for name, file_list in files.iteritems(): self.logInfo(_("Starting merging of"), name) - final_file = open(safe_join(download_folder, name), "wb") - - for splitted_file in file_list: - self.logDebug("Merging part", splitted_file) - pyfile = self.core.files.getFile(fid_dict[splitted_file]) - pyfile.setStatus("processing") - try: - s_file = open(os.path.join(download_folder, splitted_file), "rb") - size_written = 0 - s_file_size = int(os.path.getsize(os.path.join(download_folder, splitted_file))) - - while True: - f_buffer = s_file.read(self.BUFFER_SIZE) - if f_buffer: - final_file.write(f_buffer) - size_written += self.BUFFER_SIZE - pyfile.setProgress((size_written * 100) / s_file_size) - else: - break - - s_file.close() - self.logDebug("Finished merging part", splitted_file) - - except Exception, e: - print_exc() - - finally: - pyfile.setProgress(100) - pyfile.setStatus("finished") - pyfile.release() - - final_file.close() + + final_file = open(save_join(download_folder, name), "wb") + for splitted_file in file_list: + self.logDebug("Merging part", splitted_file) + + pyfile = self.core.files.getFile(fid_dict[splitted_file]) + + pyfile.setStatus("processing") + + try: + with open(os.path.join(download_folder, splitted_file), "rb") as s_file: + size_written = 0 + s_file_size = int(os.path.getsize(os.path.join(download_folder, splitted_file))) + + while True: + f_buffer = s_file.read(self.BUFFER_SIZE) + if f_buffer: + final_file.write(f_buffer) + size_written += self.BUFFER_SIZE + pyfile.setProgress((size_written * 100) / s_file_size) + else: + break + + self.logDebug("Finished merging part", splitted_file) + + except Exception, e: + print_exc() + + finally: + pyfile.setProgress(100) + pyfile.setStatus("finished") + pyfile.release() + self.logInfo(_("Finished merging of"), name) diff --git a/pyload/plugins/addon/MultiHome.py b/pyload/plugins/addon/MultiHome.py index 4371125dc..bcb51254d 100644 --- a/pyload/plugins/addon/MultiHome.py +++ b/pyload/plugins/addon/MultiHome.py @@ -8,16 +8,20 @@ from pyload.plugins.internal.Addon import Addon class MultiHome(Addon): __name__ = "MultiHome" __type__ = "addon" - __version__ = "0.11" + __version__ = "0.12" - __config__ = [("activated" , "bool", "Activated" , False ), - ("interfaces", "str" , "Interfaces", "None")] + __config__ = [("interfaces", "str" , "Interfaces", "None")] __description__ = """Ip address changer""" __license__ = "GPLv3" __authors__ = [("mkaay", "mkaay@mkaay.de")] + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def setup(self): self.register = {} self.interfaces = [] diff --git a/pyload/plugins/addon/SkipRev.py b/pyload/plugins/addon/SkipRev.py index 0c14282a1..66ddc89d2 100644 --- a/pyload/plugins/addon/SkipRev.py +++ b/pyload/plugins/addon/SkipRev.py @@ -1,9 +1,7 @@ # -*- coding: utf-8 -*- -import re - from urllib import unquote -from urlparse import urljoin, urlparse +from urlparse import urlparse from pyload.plugins.internal.Addon import Addon from pyload.plugins.Plugin import SkipDownload @@ -12,17 +10,20 @@ from pyload.plugins.Plugin import SkipDownload class SkipRev(Adoon): __name__ = "SkipRev" __type__ = "addon" - __version__ = "0.13" + __version__ = "0.14" - __config__ = [("auto", "bool", "Automatically keep all rev files needed by package", True), - ("tokeep", "int" , "Min number of rev files to keep for package" , 1), - ("unskip", "bool", "Restart a skipped rev when download fails" , True)] + __config__ = [("tokeep", "int", "Number of rev files to keep for package (-1 to auto)", -1)] __description__ = """Skip files ending with extension rev""" __license__ = "GPLv3" __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def _setup(self): super(self.pyfile.plugin, self).setup() if self.pyfile.hasStatus("skipped"): @@ -55,11 +56,11 @@ class SkipRev(Adoon): tokeep = self.getConfig("tokeep") - if tokeep > 0: + if tokeep: saved = [True for link in pyfile.package().getChildren() \ if link.name.endswith(".rev") and (link.hasStatus("finished") or link.hasStatus("downloading"))].count(True) - if saved < tokeep: + if not saved or saved < tokeep: #: keep one rev at least in auto mode return pyfile.setCustomStatus("SkipRev", "skipped") @@ -67,15 +68,15 @@ class SkipRev(Adoon): def downloadFailed(self, pyfile): - if self.getConfig("auto") is False: - - if self.getConfig("unskip") is False: - return + tokeep = self.getConfig("tokeep") - if not pyfile.name.endswith(".rev"): - return + if not tokeep: + return for link in pyfile.package().getChildren(): if link.hasStatus("skipped") and link.name.endswith(".rev"): - link.setCustomStatus("unskipped", "queued") + if tokeep > -1 or pyfile.name.endswith(".rev"): + link.setStatus("queued") + else: + link.setCustomStatus("unskipped", "queued") return diff --git a/pyload/plugins/addon/UnSkipOnFail.py b/pyload/plugins/addon/UnSkipOnFail.py index 0bccca75f..a0b3ec540 100644 --- a/pyload/plugins/addon/UnSkipOnFail.py +++ b/pyload/plugins/addon/UnSkipOnFail.py @@ -10,7 +10,7 @@ from pyload.utils import fs_encode class UnSkipOnFail(Addon): __name__ = "UnSkipOnFail" __type__ = "addon" - __version__ = "0.01" + __version__ = "0.02" __config__ = [("activated", "bool", "Activated", True)] @@ -19,6 +19,11 @@ class UnSkipOnFail(Addon): __authors__ = [("hagg", None)] + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def downloadFailed(self, pyfile): pyfile_name = basename(pyfile.name) pid = pyfile.package().id diff --git a/pyload/plugins/addon/WindowsPhoneToastNotify.py b/pyload/plugins/addon/WindowsPhoneToastNotify.py index 5b62c49a8..fbaa89ea4 100644 --- a/pyload/plugins/addon/WindowsPhoneToastNotify.py +++ b/pyload/plugins/addon/WindowsPhoneToastNotify.py @@ -9,10 +9,9 @@ from pyload.plugins.internal.Addon import Addon class WindowsPhoneToastNotify(Addon): __name__ = "WindowsPhoneToastNotify" __type__ = "addon" - __version__ = "0.02" + __version__ = "0.03" - __config__ = [("activated" , "bool", "Activated" , False), - ("force" , "bool", "Force even if client is connected" , False), + __config__ = [("force" , "bool", "Force even if client is connected" , False), ("pushId" , "str" , "pushId" , "" ), ("pushUrl" , "str" , "pushUrl" , "" ), ("pushTimeout", "int" , "Timeout between notifications in seconds", 0 )] @@ -22,6 +21,11 @@ class WindowsPhoneToastNotify(Addon): __authors__ = [("Andy Voigt", "phone-support@hotmail.de")] + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def getXmlData(self): myxml = ("<?xml version='1.0' encoding='utf-8'?> <wp:Notification xmlns:wp='WPNotification'> " "<wp:Toast> <wp:Text1>Pyload Mobile</wp:Text1> <wp:Text2>Captcha waiting!</wp:Text2> " diff --git a/pyload/plugins/container/CCF.py b/pyload/plugins/container/CCF.py index 98533cbd8..a558baa03 100644 --- a/pyload/plugins/container/CCF.py +++ b/pyload/plugins/container/CCF.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- +from __future__ import with_statement + import re from os import makedirs @@ -14,7 +16,7 @@ from pyload.utils import safe_join class CCF(Container): __name__ = "CCF" - __version__ = "0.2" + __version__ = "0.20" __pattern__ = r'.+\.ccf' @@ -35,8 +37,7 @@ class CCF(Container): download_folder = self.config['general']['download_folder'] tempdlc_name = safe_join(download_folder, "tmp_%s.dlc" % pyfile.name) - tempdlc = open(tempdlc_name, "w") - tempdlc.write(re.search(r'<dlc>(.*)</dlc>', tempdlc_content, re.S).group(1)) - tempdlc.close() + with open(tempdlc_name, "w") as tempdlc: + tempdlc.write(re.search(r'<dlc>(.*)</dlc>', tempdlc_content, re.S).group(1)) self.urls = [tempdlc_name] diff --git a/pyload/plugins/crypter/ChipDe.py b/pyload/plugins/crypter/ChipDe.py index d107f34ae..842fff292 100644 --- a/pyload/plugins/crypter/ChipDe.py +++ b/pyload/plugins/crypter/ChipDe.py @@ -7,7 +7,7 @@ from pyload.plugins.internal.Crypter import Crypter class ChipDe(Crypter): __name__ = "ChipDe" __type__ = "crypter" - __version__ = "0.1" + __version__ = "0.10" __pattern__ = r'http://(?:www\.)?chip\.de/video/.*\.html' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), diff --git a/pyload/plugins/crypter/CzshareCom.py b/pyload/plugins/crypter/CzshareCom.py index b79f540ff..61d943222 100644 --- a/pyload/plugins/crypter/CzshareCom.py +++ b/pyload/plugins/crypter/CzshareCom.py @@ -7,7 +7,7 @@ from pyload.plugins.internal.Crypter import Crypter class CzshareCom(Crypter): __name__ = "CzshareCom" __type__ = "crypter" - __version__ = "0.2" + __version__ = "0.20" __pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/folders/.*' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), diff --git a/pyload/plugins/crypter/DDLMusicOrg.py b/pyload/plugins/crypter/DDLMusicOrg.py index 348c2db51..ec50a3265 100644 --- a/pyload/plugins/crypter/DDLMusicOrg.py +++ b/pyload/plugins/crypter/DDLMusicOrg.py @@ -10,7 +10,7 @@ from pyload.plugins.internal.Crypter import Crypter class DDLMusicOrg(Crypter): __name__ = "DDLMusicOrg" __type__ = "crypter" - __version__ = "0.3" + __version__ = "0.30" __pattern__ = r'http://(?:www\.)?ddl-music\.org/captcha/ddlm_cr\d\.php\?\d+\?\d+' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), diff --git a/pyload/plugins/crypter/Dereferer.py b/pyload/plugins/crypter/Dereferer.py index 4a647a952..94a3aa1e4 100644 --- a/pyload/plugins/crypter/Dereferer.py +++ b/pyload/plugins/crypter/Dereferer.py @@ -10,7 +10,7 @@ from pyload.plugins.internal.Crypter import Crypter class Dereferer(Crypter): __name__ = "Dereferer" __type__ = "crypter" - __version__ = "0.1" + __version__ = "0.10" __pattern__ = r'https?://([^/]+)/.*?(?P<url>(ht|f)tps?(://|%3A%2F%2F).*)' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), diff --git a/pyload/plugins/crypter/DontKnowMe.py b/pyload/plugins/crypter/DontKnowMe.py index 0e63233e8..e48f56561 100644 --- a/pyload/plugins/crypter/DontKnowMe.py +++ b/pyload/plugins/crypter/DontKnowMe.py @@ -10,7 +10,7 @@ from pyload.plugins.internal.Crypter import Crypter class DontKnowMe(Crypter): __name__ = "DontKnowMe" __type__ = "crypter" - __version__ = "0.1" + __version__ = "0.10" __pattern__ = r'http://(?:www\.)?dontknow\.me/at/\?.+$' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), diff --git a/pyload/plugins/crypter/FilecryptCc.py b/pyload/plugins/crypter/FilecryptCc.py index ee8076b17..ee8b3a99f 100644 --- a/pyload/plugins/crypter/FilecryptCc.py +++ b/pyload/plugins/crypter/FilecryptCc.py @@ -107,10 +107,10 @@ class FilecryptCc(Crypter): weblinks = re.findall(self.WEBLINK_PATTERN, self.siteWithLinks) for link in weblinks: - response = self.load("http://filecrypt.cc/Link/%s.html" % link, cookies=True) - link2 = re.search('<iframe noresize src="(.*)"></iframe>', response) - response2 = self.load(link2.group(1), just_header=True, cookies=True) - self.links.append(response2['location']) + res = self.load("http://filecrypt.cc/Link/%s.html" % link, cookies=True) + link2 = re.search('<iframe noresize src="(.*)"></iframe>', res) + res2 = self.load(link2.group(1), just_header=True, cookies=True) + self.links.append(res2['location']) except Exception, e: self.logDebug("Error decrypting weblinks: %s" % e) diff --git a/pyload/plugins/crypter/FourChanOrg.py b/pyload/plugins/crypter/FourChanOrg.py index 37d205f73..6ce037f22 100644 --- a/pyload/plugins/crypter/FourChanOrg.py +++ b/pyload/plugins/crypter/FourChanOrg.py @@ -10,7 +10,7 @@ from pyload.plugins.internal.Crypter import Crypter class FourChanOrg(Crypter): __name__ = "FourChanOrg" __type__ = "crypter" - __version__ = "0.3" + __version__ = "0.30" __pattern__ = r'http://(?:www\.)?boards\.4chan\.org/\w+/res/(\d+)' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), diff --git a/pyload/plugins/crypter/HoerbuchIn.py b/pyload/plugins/crypter/HoerbuchIn.py index fa409a94c..0bc374e7a 100644 --- a/pyload/plugins/crypter/HoerbuchIn.py +++ b/pyload/plugins/crypter/HoerbuchIn.py @@ -10,7 +10,7 @@ from pyload.plugins.internal.Crypter import Crypter class HoerbuchIn(Crypter): __name__ = "HoerbuchIn" __type__ = "crypter" - __version__ = "0.6" + __version__ = "0.60" __pattern__ = r'http://(?:www\.)?hoerbuch\.in/(wp/horbucher/\d+/.+/|tp/out\.php\?.+|protection/folder_\d+\.html)' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), diff --git a/pyload/plugins/crypter/HotfileCom.py b/pyload/plugins/crypter/HotfileCom.py index eee4b745f..f64968e15 100644 --- a/pyload/plugins/crypter/HotfileCom.py +++ b/pyload/plugins/crypter/HotfileCom.py @@ -6,7 +6,7 @@ from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class HotfileCom(DeadCrypter): __name__ = "HotfileCom" __type__ = "crypter" - __version__ = "0.3" + __version__ = "0.30" __pattern__ = r'https?://(?:www\.)?hotfile\.com/list/\w+/\w+' __config__ = [] diff --git a/pyload/plugins/crypter/LetitbitNet.py b/pyload/plugins/crypter/LetitbitNet.py index 6942aa3ca..5706465bf 100644 --- a/pyload/plugins/crypter/LetitbitNet.py +++ b/pyload/plugins/crypter/LetitbitNet.py @@ -7,7 +7,7 @@ from pyload.plugins.internal.Crypter import Crypter class LetitbitNet(Crypter): __name__ = "LetitbitNet" __type__ = "crypter" - __version__ = "0.1" + __version__ = "0.10" __pattern__ = r'http://(?:www\.)?letitbit\.net/folder/\w+' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), diff --git a/pyload/plugins/crypter/MultiloadCz.py b/pyload/plugins/crypter/MultiloadCz.py index 02b60876e..75f232929 100644 --- a/pyload/plugins/crypter/MultiloadCz.py +++ b/pyload/plugins/crypter/MultiloadCz.py @@ -7,7 +7,7 @@ from pyload.plugins.internal.Crypter import Crypter class MultiloadCz(Crypter): __name__ = "MultiloadCz" __type__ = "crypter" - __version__ = "0.4" + __version__ = "0.40" __pattern__ = r'http://(?:[^/]*\.)?multiload\.cz/(stahnout|slozka)/.*' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), diff --git a/pyload/plugins/crypter/NCryptIn.py b/pyload/plugins/crypter/NCryptIn.py index 15cfdaa03..852c75b54 100644 --- a/pyload/plugins/crypter/NCryptIn.py +++ b/pyload/plugins/crypter/NCryptIn.py @@ -156,9 +156,9 @@ class NCryptIn(Crypter): captcha_key = re.search(r'\?k=(.*?)"', form).group(1) self.logDebug("Resolving ReCaptcha with key [%s]" % captcha_key) recaptcha = ReCaptcha(self) - challenge, code = recaptcha.challenge(captcha_key) + challenge, response = recaptcha.challenge(captcha_key) postData['recaptcha_challenge_field'] = challenge - postData['recaptcha_response_field'] = code + postData['recaptcha_response_field'] = response # Resolve circlecaptcha if "circlecaptcha" in form: diff --git a/pyload/plugins/crypter/OneKhDe.py b/pyload/plugins/crypter/OneKhDe.py index ff15b0baa..14b48549e 100644 --- a/pyload/plugins/crypter/OneKhDe.py +++ b/pyload/plugins/crypter/OneKhDe.py @@ -9,7 +9,7 @@ from pyload.plugins.internal.Crypter import Crypter class OneKhDe(Crypter): __name__ = "OneKhDe" __type__ = "crypter" - __version__ = "0.1" + __version__ = "0.10" __pattern__ = r'http://(?:www\.)?1kh\.de/f/' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), diff --git a/pyload/plugins/crypter/QuickshareCz.py b/pyload/plugins/crypter/QuickshareCz.py index 156c5feeb..c1064bd20 100644 --- a/pyload/plugins/crypter/QuickshareCz.py +++ b/pyload/plugins/crypter/QuickshareCz.py @@ -7,7 +7,7 @@ from pyload.plugins.internal.Crypter import Crypter class QuickshareCz(Crypter): __name__ = "QuickshareCz" __type__ = "crypter" - __version__ = "0.1" + __version__ = "0.10" __pattern__ = r'http://(?:www\.)?quickshare\.cz/slozka-\d+.*' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), diff --git a/pyload/plugins/crypter/RelinkUs.py b/pyload/plugins/crypter/RelinkUs.py index c5e312f93..2eb72dd17 100644 --- a/pyload/plugins/crypter/RelinkUs.py +++ b/pyload/plugins/crypter/RelinkUs.py @@ -228,20 +228,29 @@ class RelinkUs(Crypter): def handleWEBLinks(self): self.logDebug("Search for WEB links") + package_links = [] - fw_params = re.findall(self.WEB_FORWARD_REGEX, self.html) - self.logDebug("Decrypting %d Web links" % len(fw_params)) - for index, fw_param in enumerate(fw_params): + params = re.findall(self.WEB_FORWARD_REGEX, self.html) + + self.logDebug("Decrypting %d Web links" % len(params)) + + for index, param in enumerate(params): try: - fw_url = self.WEB_FORWARD_URL + "?%s" % fw_param - self.logDebug("Decrypting Web link %d, %s" % (index + 1, fw_url)) - fw_response = self.load(fw_url, decode=True) - dl_link = re.search(self.WEB_LINK_REGEX, fw_response).group('link') - package_links.append(dl_link) + url = self.WEB_FORWARD_URL + "?%s" % param + + self.logDebug("Decrypting Web link %d, %s" % (index + 1, url)) + + res = self.load(url, decode=True) + link = re.search(self.WEB_LINK_REGEX, res).group('link') + + package_links.append(link) + except Exception, detail: self.logDebug("Error decrypting Web link %s, %s" % (index, detail)) + self.setWait(4) self.wait() + return package_links diff --git a/pyload/plugins/crypter/SafelinkingNet.py b/pyload/plugins/crypter/SafelinkingNet.py index 681e07cd1..06243d069 100644 --- a/pyload/plugins/crypter/SafelinkingNet.py +++ b/pyload/plugins/crypter/SafelinkingNet.py @@ -57,7 +57,7 @@ class SafelinkingNet(Crypter): challenge, response = captcha.challenge(captchaKey) postData['adcopy_challenge'] = challenge - postData['adcopy_response'] = response + postData['adcopy_response'] = response self.html = self.load(url, post=postData) if "The password you entered was incorrect" in self.html: diff --git a/pyload/plugins/crypter/SpeedLoadOrg.py b/pyload/plugins/crypter/SpeedLoadOrg.py index 0228a49d6..5819c78c9 100644 --- a/pyload/plugins/crypter/SpeedLoadOrg.py +++ b/pyload/plugins/crypter/SpeedLoadOrg.py @@ -6,7 +6,7 @@ from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class SpeedLoadOrg(DeadCrypter): __name__ = "SpeedLoadOrg" __type__ = "crypter" - __version__ = "0.3" + __version__ = "0.30" __pattern__ = r'http://(?:www\.)?speedload\.org/(\d+~f$|folder/\d+/)' __config__ = [] diff --git a/pyload/plugins/crypter/StealthTo.py b/pyload/plugins/crypter/StealthTo.py index 2e64a8cbd..c5236c3e9 100644 --- a/pyload/plugins/crypter/StealthTo.py +++ b/pyload/plugins/crypter/StealthTo.py @@ -6,7 +6,7 @@ from pyload.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class StealthTo(DeadCrypter): __name__ = "StealthTo" __type__ = "crypter" - __version__ = "0.2" + __version__ = "0.20" __pattern__ = r'http://(?:www\.)?stealth\.to/folder/.+' __config__ = [] diff --git a/pyload/plugins/crypter/UlozTo.py b/pyload/plugins/crypter/UlozTo.py index 8538736ca..53380b5da 100644 --- a/pyload/plugins/crypter/UlozTo.py +++ b/pyload/plugins/crypter/UlozTo.py @@ -7,7 +7,7 @@ from pyload.plugins.internal.Crypter import Crypter class UlozTo(Crypter): __name__ = "UlozTo" __type__ = "crypter" - __version__ = "0.2" + __version__ = "0.20" __pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(m|soubory)/.*' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), diff --git a/pyload/plugins/crypter/XupPl.py b/pyload/plugins/crypter/XupPl.py index 7be72cf9e..bf285f96c 100644 --- a/pyload/plugins/crypter/XupPl.py +++ b/pyload/plugins/crypter/XupPl.py @@ -6,7 +6,7 @@ from pyload.plugins.internal.Crypter import Crypter class XupPl(Crypter): __name__ = "XupPl" __type__ = "crypter" - __version__ = "0.1" + __version__ = "0.10" __pattern__ = r'https?://(?:[^/]*\.)?xup\.pl/.*' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), diff --git a/pyload/plugins/hook/BypassCaptcha.py b/pyload/plugins/hook/BypassCaptcha.py index 26e6794c0..b6e237b37 100644 --- a/pyload/plugins/hook/BypassCaptcha.py +++ b/pyload/plugins/hook/BypassCaptcha.py @@ -28,7 +28,7 @@ class BypassCaptchaException(Exception): class BypassCaptcha(Hook): __name__ = "BypassCaptcha" __type__ = "hook" - __version__ = "0.04" + __version__ = "0.05" __config__ = [("force", "bool", "Force BC even if client is connected", False), ("passkey", "password", "Passkey", "")] @@ -47,6 +47,11 @@ class BypassCaptcha(Hook): GETCREDITS_URL = "http://bypasscaptcha.com/ex_left.php" + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def getCredits(self): res = getURL(self.GETCREDITS_URL, post={"key": self.getConfig("passkey")}) diff --git a/pyload/plugins/hook/Captcha9kw.py b/pyload/plugins/hook/Captcha9kw.py index f01f45011..ed1b27646 100644 --- a/pyload/plugins/hook/Captcha9kw.py +++ b/pyload/plugins/hook/Captcha9kw.py @@ -16,7 +16,7 @@ from pyload.plugins.internal.Addon import Hook class Captcha9kw(Hook): __name__ = "Captcha9kw" __type__ = "hook" - __version__ = "0.25" + __version__ = "0.26" __config__ = [("ssl" , "bool" , "Use HTTPS" , True ), ("force" , "bool" , "Force captcha resolving even if client is connected" , True ), @@ -39,6 +39,11 @@ class Captcha9kw(Hook): API_URL = "http://www.9kw.eu/index.cgi" + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def coreReady(self): if self.getConfig("ssl"): self.API_URL = self.API_URL.replace("http://", "https://") diff --git a/pyload/plugins/hook/CaptchaBrotherhood.py b/pyload/plugins/hook/CaptchaBrotherhood.py index 8c037009a..1f3aebd85 100644 --- a/pyload/plugins/hook/CaptchaBrotherhood.py +++ b/pyload/plugins/hook/CaptchaBrotherhood.py @@ -38,7 +38,7 @@ class CaptchaBrotherhoodException(Exception): class CaptchaBrotherhood(Hook): __name__ = "CaptchaBrotherhood" __type__ = "hook" - __version__ = "0.05" + __version__ = "0.06" __config__ = [("username", "str", "Username", ""), ("force", "bool", "Force CT even if client is connected", False), @@ -53,6 +53,11 @@ class CaptchaBrotherhood(Hook): API_URL = "http://www.captchabrotherhood.com/" + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def getCredits(self): res = getURL(self.API_URL + "askCredits.aspx", get={"username": self.getConfig("username"), "password": self.getConfig("passkey")}) diff --git a/pyload/plugins/hook/DeathByCaptcha.py b/pyload/plugins/hook/DeathByCaptcha.py index 429258f89..dc737020c 100644 --- a/pyload/plugins/hook/DeathByCaptcha.py +++ b/pyload/plugins/hook/DeathByCaptcha.py @@ -51,7 +51,7 @@ class DeathByCaptchaException(Exception): class DeathByCaptcha(Hook): __name__ = "DeathByCaptcha" __type__ = "hook" - __version__ = "0.03" + __version__ = "0.04" __config__ = [("username", "str", "Username", ""), ("passkey", "password", "Password", ""), @@ -66,6 +66,11 @@ class DeathByCaptcha(Hook): API_URL = "http://api.dbcapi.me/api/" + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def call_api(self, api="captcha", post=False, multipart=False): req = getRequest() req.c.setopt(HTTPHEADER, ["Accept: application/json", "User-Agent: pyLoad %s" % self.core.version]) diff --git a/pyload/plugins/hook/ExpertDecoders.py b/pyload/plugins/hook/ExpertDecoders.py index 658a55288..dbd03c30c 100644 --- a/pyload/plugins/hook/ExpertDecoders.py +++ b/pyload/plugins/hook/ExpertDecoders.py @@ -14,7 +14,7 @@ from pyload.plugins.internal.Addon import Hook class ExpertDecoders(Hook): __name__ = "ExpertDecoders" __type__ = "hook" - __version__ = "0.01" + __version__ = "0.02" __config__ = [("force", "bool", "Force CT even if client is connected", False), ("passkey", "password", "Access key", "")] @@ -28,6 +28,11 @@ class ExpertDecoders(Hook): API_URL = "http://www.fasttypers.org/imagepost.ashx" + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def getCredits(self): res = getURL(self.API_URL, post={"key": self.getConfig("passkey"), "action": "balance"}) diff --git a/pyload/plugins/hook/ImageTyperz.py b/pyload/plugins/hook/ImageTyperz.py index b7d7cdd21..c0b046787 100644 --- a/pyload/plugins/hook/ImageTyperz.py +++ b/pyload/plugins/hook/ImageTyperz.py @@ -32,7 +32,7 @@ class ImageTyperzException(Exception): class ImageTyperz(Hook): __name__ = "ImageTyperz" __type__ = "hook" - __version__ = "0.04" + __version__ = "0.05" __config__ = [("username", "str", "Username", ""), ("passkey", "password", "Password", ""), @@ -49,6 +49,11 @@ class ImageTyperz(Hook): GETCREDITS_URL = "http://captchatypers.com/Forms/RequestBalance.ashx" + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def getCredits(self): res = getURL(self.GETCREDITS_URL, post={'action': "REQUESTBALANCE", diff --git a/pyload/plugins/hook/LinkdecrypterCom.py b/pyload/plugins/hook/LinkdecrypterCom.py index 95145d462..15697e0a2 100644 --- a/pyload/plugins/hook/LinkdecrypterCom.py +++ b/pyload/plugins/hook/LinkdecrypterCom.py @@ -10,13 +10,18 @@ from pyload.utils import remove_chars class LinkdecrypterCom(Hook): __name__ = "LinkdecrypterCom" __type__ = "hook" - __version__ = "0.20" + __version__ = "0.21" __description__ = """Linkdecrypter.com hook plugin""" __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def coreReady(self): try: self.loadPatterns() diff --git a/pyload/plugins/hook/RPNetBiz.py b/pyload/plugins/hook/RPNetBiz.py index dc3caf39e..ed8835ce8 100644 --- a/pyload/plugins/hook/RPNetBiz.py +++ b/pyload/plugins/hook/RPNetBiz.py @@ -8,7 +8,7 @@ from pyload.plugins.internal.MultiHoster import MultiHoster class RPNetBiz(MultiHoster): __name__ = "RPNetBiz" __type__ = "hook" - __version__ = "0.1" + __version__ = "0.10" __config__ = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), ("hosterList", "str", "Hoster list (comma separated)", ""), diff --git a/pyload/plugins/hook/XFileSharingPro.py b/pyload/plugins/hook/XFileSharingPro.py index 42c4c6264..fc8c37127 100644 --- a/pyload/plugins/hook/XFileSharingPro.py +++ b/pyload/plugins/hook/XFileSharingPro.py @@ -8,7 +8,7 @@ from pyload.plugins.internal.Addon import Hook class XFileSharingPro(Hook): __name__ = "XFileSharingPro" __type__ = "hook" - __version__ = "0.25" + __version__ = "0.26" __config__ = [("activated", "bool", "Activated", True), ("use_hoster_list", "bool", "Load listed hosters only", True), @@ -44,6 +44,11 @@ class XFileSharingPro(Hook): # self.loadPattern() + #@TODO: Remove in 0.4.10 + def initPeriodical(self): + pass + + def coreReady(self): self.loadPattern() diff --git a/pyload/plugins/hoster/BitshareCom.py b/pyload/plugins/hoster/BitshareCom.py index 0a6318c77..9fd98643c 100644 --- a/pyload/plugins/hoster/BitshareCom.py +++ b/pyload/plugins/hoster/BitshareCom.py @@ -115,10 +115,12 @@ class BitshareCom(SimpleHoster): # Try up to 3 times for i in xrange(3): - challenge, code = recaptcha.challenge() + challenge, response = recaptcha.challenge() res = self.load("http://bitshare.com/files-ajax/" + self.file_id + "/request.html", - post={"request": "validateCaptcha", "ajaxid": self.ajaxid, - "recaptcha_challenge_field": challenge, "recaptcha_response_field": code}) + post={"request" : "validateCaptcha", + "ajaxid" : self.ajaxid, + "recaptcha_challenge_field": challenge, + "recaptcha_response_field" : response}) if self.handleCaptchaErrors(res): break diff --git a/pyload/plugins/hoster/CatShareNet.py b/pyload/plugins/hoster/CatShareNet.py index 63a550bd4..146b639de 100644 --- a/pyload/plugins/hoster/CatShareNet.py +++ b/pyload/plugins/hoster/CatShareNet.py @@ -50,10 +50,10 @@ class CatShareNet(SimpleHoster): recaptcha = ReCaptcha(self) - challenge, code = recaptcha.challenge() + challenge, response = recaptcha.challenge() self.html = self.load(self.pyfile.url, post={'recaptcha_challenge_field': challenge, - 'recaptcha_response_field': code}) + 'recaptcha_response_field' : response}) m = re.search(self.LINK_PATTERN, self.html) if m is None: diff --git a/pyload/plugins/hoster/DailymotionCom.py b/pyload/plugins/hoster/DailymotionCom.py index 9e665912a..201897719 100644 --- a/pyload/plugins/hoster/DailymotionCom.py +++ b/pyload/plugins/hoster/DailymotionCom.py @@ -40,7 +40,7 @@ def getInfo(urls): class DailymotionCom(Hoster): __name__ = "DailymotionCom" __type__ = "hoster" - __version__ = "0.2" + __version__ = "0.20" __pattern__ = r'https?://(?:www\.)?dailymotion\.com/.*video/(?P<ID>[\w^_]+)' __config__ = [("quality", "Lowest;LD 144p;LD 240p;SD 384p;HQ 480p;HD 720p;HD 1080p;Highest", "Quality", "Highest")] diff --git a/pyload/plugins/hoster/DlFreeFr.py b/pyload/plugins/hoster/DlFreeFr.py index d9950f0a4..050fa0442 100644 --- a/pyload/plugins/hoster/DlFreeFr.py +++ b/pyload/plugins/hoster/DlFreeFr.py @@ -3,10 +3,11 @@ import pycurl import re -from pyload.utils import json_loads from pyload.network.Browser import Browser from pyload.network.CookieJar import CookieJar +from pyload.plugins.internal.captcha import AdYouLike from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, replace_patterns +from pyload.utils import json_loads class CustomBrowser(Browser): @@ -33,87 +34,10 @@ class CustomBrowser(Browser): return Browser.load(self, *args, **kwargs) -class AdYouLike(object): - """ - Class to support adyoulike captcha service - """ - ADYOULIKE_INPUT_PATTERN = r'Adyoulike\.create\((.*?)\);' - ADYOULIKE_CALLBACK = r'Adyoulike\.g\._jsonp_5579316662423138' - ADYOULIKE_CHALLENGE_PATTERN = ADYOULIKE_CALLBACK + r'\((.*?)\)' - - - def __init__(self, plugin, engine="adyoulike"): - self.plugin = plugin - self.engine = engine - - - def challenge(self, html): - adyoulike_data_string = None - m = re.search(self.ADYOULIKE_INPUT_PATTERN, html) - if m: - adyoulike_data_string = m.group(1) - else: - self.plugin.fail("Can't read AdYouLike input data") - - # {"adyoulike":{"key":"P~zQ~O0zV0WTiAzC-iw0navWQpCLoYEP"}, - # "all":{"element_id":"ayl_private_cap_92300","lang":"fr","env":"prod"}} - ayl_data = json_loads(adyoulike_data_string) - - res = self.plugin.load("http://api-ayl.appspot.com/challenge", - get={'key' : ayl_data[self.engine]['key'], - 'env' : ayl_data['all']['env'], - 'callback': self.ADYOULIKE_CALLBACK}) - - m = re.search(self.ADYOULIKE_CHALLENGE_PATTERN, res) - challenge_string = None - if m: - challenge_string = m.group(1) - else: - self.plugin.fail("Invalid AdYouLike challenge") - challenge_data = json_loads(challenge_string) - - return ayl_data, challenge_data - - - def result(self, ayl, challenge): - """ - Adyoulike.g._jsonp_5579316662423138 - ({"translations":{"fr":{"instructions_visual":"Recopiez « Soonnight » ci-dessous :"}}, - "site_under":true,"clickable":true,"pixels":{"VIDEO_050":[],"DISPLAY":[],"VIDEO_000":[],"VIDEO_100":[], - "VIDEO_025":[],"VIDEO_075":[]},"medium_type":"image/adyoulike", - "iframes":{"big":"<iframe src=\"http://www.soonnight.com/campagn.html\" scrolling=\"no\" - height=\"250\" width=\"300\" frameborder=\"0\"></iframe>"},"shares":{},"id":256, - "token":"e6QuI4aRSnbIZJg02IsV6cp4JQ9~MjA1","formats":{"small":{"y":300,"x":0,"w":300,"h":60}, - "big":{"y":0,"x":0,"w":300,"h":250},"hover":{"y":440,"x":0,"w":300,"h":60}}, - "tid":"SqwuAdxT1EZoi4B5q0T63LN2AkiCJBg5"}) - """ - response = None - try: - instructions_visual = challenge['translations'][ayl['all']['lang']]['instructions_visual'] - m = re.search(u".*«(.*)».*", instructions_visual) - if m: - response = m.group(1).strip() - else: - self.plugin.fail("Can't parse instructions visual") - except KeyError: - self.plugin.fail("No instructions visual") - - #TODO: Supports captcha - - if not response: - self.plugin.fail("AdYouLike result failed") - - return {"_ayl_captcha_engine": self.engine, - "_ayl_env": ayl['all']['env'], - "_ayl_tid": challenge['tid'], - "_ayl_token_challenge": challenge['token'], - "_ayl_response": response} - - class DlFreeFr(SimpleHoster): __name__ = "DlFreeFr" __type__ = "hoster" - __version__ = "0.25" + __version__ = "0.26" __pattern__ = r'http://(?:www\.)?dl\.free\.fr/(\w+|getfile\.pl\?file=/\w+)' @@ -169,9 +93,7 @@ class DlFreeFr(SimpleHoster): action, inputs = self.parseHtmlForm('action="getfile.pl"') adyoulike = AdYouLike(self) - ayl, challenge = adyoulike.challenge(self.html) - result = adyoulike.result(ayl, challenge) - inputs.update(result) + inputs.update(adyoulike.challenge()) self.load("http://dl.free.fr/getfile.pl", post=inputs) headers = self.getLastHeaders() diff --git a/pyload/plugins/hoster/FilecloudIo.py b/pyload/plugins/hoster/FilecloudIo.py index db1c0eee4..deca28007 100644 --- a/pyload/plugins/hoster/FilecloudIo.py +++ b/pyload/plugins/hoster/FilecloudIo.py @@ -58,9 +58,9 @@ class FilecloudIo(SimpleHoster): if not self.account: self.fail(_("User not logged in")) elif not self.account.logged_in: - captcha_challenge, captcha_response = recaptcha.challenge(captcha_key) - self.account.form_data = {"recaptcha_challenge_field": captcha_challenge, - "recaptcha_response_field": captcha_response} + challenge, response = recaptcha.challenge(captcha_key) + self.account.form_data = {"recaptcha_challenge_field": challenge, + "recaptcha_response_field" : response} self.account.relogin(self.user) self.retry(2) diff --git a/pyload/plugins/hoster/FilepostCom.py b/pyload/plugins/hoster/FilepostCom.py index 2948f3bc6..e80ec56bc 100644 --- a/pyload/plugins/hoster/FilepostCom.py +++ b/pyload/plugins/hoster/FilepostCom.py @@ -92,36 +92,39 @@ class FilepostCom(SimpleHoster): def getJsonResponse(self, get_dict, post_dict, field): - json_response = json_loads(self.load('https://filepost.com/files/get/', get=get_dict, post=post_dict)) - self.logDebug(json_response) + res = json_loads(self.load('https://filepost.com/files/get/', get=get_dict, post=post_dict)) - if not 'js' in json_response: + self.logDebug(res) + + if not 'js' in res: self.error(_("JSON %s 1") % field) - # i changed js_answer to json_response['js'] since js_answer is nowhere set. + # i changed js_answer to res['js'] since js_answer is nowhere set. # i don't know the JSON-HTTP specs in detail, but the previous author - # accessed json_response['js']['error'] as well as js_answer['error']. + # accessed res['js']['error'] as well as js_answer['error']. # see the two lines commented out with "# ~?". - if 'error' in json_response['js']: - if json_response['js']['error'] == 'download_delay': - self.retry(wait_time=json_response['js']['params']['next_download']) + if 'error' in res['js']: + + if res['js']['error'] == 'download_delay': + self.retry(wait_time=res['js']['params']['next_download']) # ~? self.retry(wait_time=js_answer['params']['next_download']) - elif 'Wrong file password' in json_response['js']['error']: - return None - elif 'You entered a wrong CAPTCHA code' in json_response['js']['error']: - return None - elif 'CAPTCHA Code nicht korrekt' in json_response['js']['error']: + + elif ('Wrong file password' in res['js']['error'] + or 'You entered a wrong CAPTCHA code' in res['js']['error'] + or 'CAPTCHA Code nicht korrekt' in res['js']['error']): return None - elif 'CAPTCHA' in json_response['js']['error']: + + elif 'CAPTCHA' in res['js']['error']: self.logDebug("Error response is unknown, but mentions CAPTCHA") return None + else: - self.fail(json_response['js']['error']) + self.fail(res['js']['error']) - if not 'answer' in json_response['js'] or not field in json_response['js']['answer']: + if not 'answer' in res['js'] or not field in res['js']['answer']: self.error(_("JSON %s 2") % field) - return json_response['js']['answer'][field] + return res['js']['answer'][field] getInfo = create_getInfo(FilepostCom) diff --git a/pyload/plugins/hoster/FileserveCom.py b/pyload/plugins/hoster/FileserveCom.py index 9be6e53ab..d98de9e6b 100644 --- a/pyload/plugins/hoster/FileserveCom.py +++ b/pyload/plugins/hoster/FileserveCom.py @@ -159,10 +159,10 @@ class FileserveCom(Hoster): recaptcha = ReCaptcha(self) for _i in xrange(5): - challenge, code = recaptcha.challenge(captcha_key) + challenge, response = recaptcha.challenge(captcha_key) res = json_loads(self.load(self.URLS[2], - post={'recaptcha_challenge_field': challenge, - 'recaptcha_response_field': code, + post={'recaptcha_challenge_field' : challenge, + 'recaptcha_response_field' : response, 'recaptcha_shortencode_field': self.file_id})) if not res['success']: self.invalidCaptcha() diff --git a/pyload/plugins/hoster/FilezyNet.py b/pyload/plugins/hoster/FilezyNet.py index 2296cf856..f36ecd51e 100644 --- a/pyload/plugins/hoster/FilezyNet.py +++ b/pyload/plugins/hoster/FilezyNet.py @@ -6,7 +6,7 @@ from pyload.plugins.internal.DeadHoster import DeadHoster, create_getInfo class FilezyNet(DeadHoster): __name__ = "FilezyNet" __type__ = "hoster" - __version__ = "0.2" + __version__ = "0.20" __pattern__ = r'http://(?:www\.)?filezy\.net/\w{12}' diff --git a/pyload/plugins/hoster/FlyFilesNet.py b/pyload/plugins/hoster/FlyFilesNet.py index 05e37e95a..6a9a3d63f 100644 --- a/pyload/plugins/hoster/FlyFilesNet.py +++ b/pyload/plugins/hoster/FlyFilesNet.py @@ -11,7 +11,7 @@ from pyload.plugins.internal.SimpleHoster import SimpleHoster class FlyFilesNet(SimpleHoster): __name__ = "FlyFilesNet" __type__ = "hoster" - __version__ = "0.1" + __version__ = "0.10" __pattern__ = r'http://(?:www\.)?flyfiles\.net/.*' diff --git a/pyload/plugins/hoster/FreevideoCz.py b/pyload/plugins/hoster/FreevideoCz.py index 7cc0a6ef7..ad6d4c336 100644 --- a/pyload/plugins/hoster/FreevideoCz.py +++ b/pyload/plugins/hoster/FreevideoCz.py @@ -6,7 +6,7 @@ from pyload.plugins.internal.DeadHoster import DeadHoster, create_getInfo class FreevideoCz(DeadHoster): __name__ = "FreevideoCz" __type__ = "hoster" - __version__ = "0.3" + __version__ = "0.30" __pattern__ = r'http://(?:www\.)?freevideo\.cz/vase-videa/.+' diff --git a/pyload/plugins/hoster/IfileIt.py b/pyload/plugins/hoster/IfileIt.py index b96734159..884bf8582 100644 --- a/pyload/plugins/hoster/IfileIt.py +++ b/pyload/plugins/hoster/IfileIt.py @@ -27,27 +27,30 @@ class IfileIt(SimpleHoster): def handleFree(self): - ukey = re.match(self.__pattern__, self.pyfile.url).group(1) - json_url = 'http://ifile.it/new_download-request.json' + ukey = re.match(self.__pattern__, self.pyfile.url).group(1) + json_url = 'http://ifile.it/new_download-request.json' post_data = {"ukey": ukey, "ab": "0"} + res = json_loads(self.load(json_url, post=post_data)) - json_response = json_loads(self.load(json_url, post=post_data)) - self.logDebug(json_response) - if json_response['status'] == 3: + self.logDebug(res) + + if res['status'] == 3: self.offline() - if json_response['captcha']: + if res['captcha']: captcha_key = re.search(self.RECAPTCHA_PATTERN, self.html).group(1) recaptcha = ReCaptcha(self) post_data['ctype'] = "recaptcha" for _i in xrange(5): - post_data['recaptcha_challenge'], post_data['recaptcha_response'] = recaptcha.challenge(captcha_key) - json_response = json_loads(self.load(json_url, post=post_data)) - self.logDebug(json_response) + challenge, response = recaptcha.challenge(captcha_key) + post_data.update({'recaptcha_challenge': challenge, + 'recaptcha_response' : response}) + res = json_loads(self.load(json_url, post=post_data)) + self.logDebug(res) - if json_response['retry']: + if res['retry']: self.invalidCaptcha() else: self.correctCaptcha() @@ -55,10 +58,10 @@ class IfileIt(SimpleHoster): else: self.fail(_("Incorrect captcha")) - if not "ticket_url" in json_response: + if not "ticket_url" in res: self.error(_("No download URL")) - self.download(json_response['ticket_url']) + self.download(res['ticket_url']) getInfo = create_getInfo(IfileIt) diff --git a/pyload/plugins/hoster/LoadTo.py b/pyload/plugins/hoster/LoadTo.py index af6c8b48e..adf951ed9 100644 --- a/pyload/plugins/hoster/LoadTo.py +++ b/pyload/plugins/hoster/LoadTo.py @@ -58,9 +58,12 @@ class LoadTo(SimpleHoster): if captcha_key is None: self.download(download_url) else: - captcha_challenge, captcha_response = solvemedia.challenge(captcha_key) - self.download(download_url, post={"adcopy_challenge": captcha_challenge, "adcopy_response": captcha_response}) + challenge, response = solvemedia.challenge(captcha_key) + + self.download(download_url, post={"adcopy_challenge": challenge, "adcopy_response": response}) + check = self.checkDownload({'404': re.compile("\A<h1>404 Not Found</h1>"), 'html': re.compile("html")}) + if check == "404": self.invalidCaptcha() self.retry() diff --git a/pyload/plugins/hoster/MediafireCom.py b/pyload/plugins/hoster/MediafireCom.py index 00e1e83cd..c9ab49643 100644 --- a/pyload/plugins/hoster/MediafireCom.py +++ b/pyload/plugins/hoster/MediafireCom.py @@ -117,6 +117,8 @@ class MediafireCom(SimpleHoster): def checkCaptcha(self): solvemedia = SolveMedia(self) - captcha_challenge, captcha_response = solvemedia.challenge() - self.html = self.load(self.url, post={"adcopy_challenge": captcha_challenge, - "adcopy_response": captcha_response}, decode=True) + challenge, response = solvemedia.challenge() + self.html = self.load(self.url, + post={'adcopy_challenge': challenge, + 'adcopy_response' : response}, + decode=True) diff --git a/pyload/plugins/hoster/MegaDebridEu.py b/pyload/plugins/hoster/MegaDebridEu.py index 1354c0e3d..66b12b164 100644 --- a/pyload/plugins/hoster/MegaDebridEu.py +++ b/pyload/plugins/hoster/MegaDebridEu.py @@ -11,7 +11,7 @@ from pyload.plugins.internal.Hoster import Hoster class MegaDebridEu(Hoster): __name__ = "MegaDebridEu" __type__ = "hoster" - __version__ = "0.4" + __version__ = "0.40" __pattern__ = r'^https?://(?:w{3}\d+\.mega-debrid\.eu|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/download/file/[^/]+/.+$' diff --git a/pyload/plugins/hoster/MyvideoDe.py b/pyload/plugins/hoster/MyvideoDe.py index 8fbd3a772..e23856f0b 100644 --- a/pyload/plugins/hoster/MyvideoDe.py +++ b/pyload/plugins/hoster/MyvideoDe.py @@ -9,7 +9,7 @@ from pyload.utils import html_unescape class MyvideoDe(Hoster): __name__ = "MyvideoDe" __type__ = "hoster" - __version__ = "0.9" + __version__ = "0.90" __pattern__ = r'http://(?:www\.)?myvideo\.de/watch/' diff --git a/pyload/plugins/hoster/OboomCom.py b/pyload/plugins/hoster/OboomCom.py index 0e907ab7a..2f50f5f87 100644 --- a/pyload/plugins/hoster/OboomCom.py +++ b/pyload/plugins/hoster/OboomCom.py @@ -13,7 +13,7 @@ from pyload.plugins.internal.captcha import ReCaptcha class OboomCom(Hoster): __name__ = "OboomCom" __type__ = "hoster" - __version__ = "0.3" + __version__ = "0.30" __pattern__ = r'https?://(?:www\.)?oboom\.com/(#(id=|/)?)?(?P<ID>\w{8})' diff --git a/pyload/plugins/hoster/PornhostCom.py b/pyload/plugins/hoster/PornhostCom.py index 7fd337485..3f1650bf0 100644 --- a/pyload/plugins/hoster/PornhostCom.py +++ b/pyload/plugins/hoster/PornhostCom.py @@ -8,7 +8,7 @@ from pyload.plugins.internal.Hoster import Hoster class PornhostCom(Hoster): __name__ = "PornhostCom" __type__ = "hoster" - __version__ = "0.2" + __version__ = "0.20" __pattern__ = r'http://(?:www\.)?pornhost\.com/(\d+/\d+\.html|\d+)' diff --git a/pyload/plugins/hoster/PornhubCom.py b/pyload/plugins/hoster/PornhubCom.py index d89d24029..7cbcabf16 100644 --- a/pyload/plugins/hoster/PornhubCom.py +++ b/pyload/plugins/hoster/PornhubCom.py @@ -8,7 +8,7 @@ from pyload.plugins.internal.Hoster import Hoster class PornhubCom(Hoster): __name__ = "PornhubCom" __type__ = "hoster" - __version__ = "0.5" + __version__ = "0.50" __pattern__ = r'http://(?:www\.)?pornhub\.com/view_video\.php\?viewkey=\w+' diff --git a/pyload/plugins/hoster/RPNetBiz.py b/pyload/plugins/hoster/RPNetBiz.py index b2a89f48a..9b2ff8d8c 100644 --- a/pyload/plugins/hoster/RPNetBiz.py +++ b/pyload/plugins/hoster/RPNetBiz.py @@ -9,7 +9,7 @@ from pyload.utils import json_loads class RPNetBiz(Hoster): __name__ = "RPNetBiz" __type__ = "hoster" - __version__ = "0.1" + __version__ = "0.10" __description__ = """RPNet.biz hoster plugin""" __license__ = "GPLv3" diff --git a/pyload/plugins/hoster/RapidgatorNet.py b/pyload/plugins/hoster/RapidgatorNet.py index 61efbcf20..7ba629c4d 100644 --- a/pyload/plugins/hoster/RapidgatorNet.py +++ b/pyload/plugins/hoster/RapidgatorNet.py @@ -129,13 +129,11 @@ class RapidgatorNet(SimpleHoster): break else: captcha, captcha_key = self.getCaptcha() - captcha_challenge, captcha_response = captcha.challenge(captcha_key) + challenge, response = captcha.challenge(captcha_key) - self.html = self.load(url, post={ - "DownloadCaptchaForm[captcha]": "", - "adcopy_challenge": captcha_challenge, - "adcopy_response": captcha_response - }) + self.html = self.load(url, post={'DownloadCaptchaForm[captcha]': "", + 'adcopy_challenge' : challenge, + 'adcopy_response' : response}) if "The verification code is incorrect" in self.html: self.invalidCaptcha() diff --git a/pyload/plugins/hoster/RapiduNet.py b/pyload/plugins/hoster/RapiduNet.py index 18e95804d..3b66d3c3f 100644 --- a/pyload/plugins/hoster/RapiduNet.py +++ b/pyload/plugins/hoster/RapiduNet.py @@ -57,12 +57,12 @@ class RapiduNet(SimpleHoster): recaptcha = ReCaptcha(self) for _i in xrange(10): - challenge, code = recaptcha.challenge(self.RECAPTCHA_KEY) + challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY) jsvars = self.getJsonResponse("https://rapidu.net/ajax.php?a=getCheckCaptcha", {'_go' : None, 'captcha1': challenge, - 'captcha2': code, + 'captcha2': response, 'fileId' : self.info['ID']}) if jsvars['message'] == 'success': self.download(jsvars['url']) @@ -70,13 +70,13 @@ class RapiduNet(SimpleHoster): def getJsonResponse(self, url, post_data): - response = self.load(url, post=post_data, decode=True) - if not response.startswith('{'): + res = self.load(url, post=post_data, decode=True) + if not res.startswith('{'): self.retry() - self.logDebug(url, response) + self.logDebug(url, res) - return json_loads(response) + return json_loads(res) getInfo = create_getInfo(RapiduNet) diff --git a/pyload/plugins/hoster/RedtubeCom.py b/pyload/plugins/hoster/RedtubeCom.py index b1272f68d..ed143d987 100644 --- a/pyload/plugins/hoster/RedtubeCom.py +++ b/pyload/plugins/hoster/RedtubeCom.py @@ -9,7 +9,7 @@ from pyload.utils import html_unescape class RedtubeCom(Hoster): __name__ = "RedtubeCom" __type__ = "hoster" - __version__ = "0.2" + __version__ = "0.20" __pattern__ = r'http://(?:www\.)?redtube\.com/\d+' diff --git a/pyload/plugins/hoster/SimplydebridCom.py b/pyload/plugins/hoster/SimplydebridCom.py index c68c6bdd0..f9063d737 100644 --- a/pyload/plugins/hoster/SimplydebridCom.py +++ b/pyload/plugins/hoster/SimplydebridCom.py @@ -8,7 +8,7 @@ from pyload.plugins.internal.Hoster import Hoster class SimplydebridCom(Hoster): __name__ = "SimplydebridCom" __type__ = "hoster" - __version__ = "0.1" + __version__ = "0.10" __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php/*' diff --git a/pyload/plugins/hoster/SoundcloudCom.py b/pyload/plugins/hoster/SoundcloudCom.py index 284f6ffbf..cc6ef83f3 100644 --- a/pyload/plugins/hoster/SoundcloudCom.py +++ b/pyload/plugins/hoster/SoundcloudCom.py @@ -9,7 +9,7 @@ from pyload.plugins.internal.Hoster import Hoster class SoundcloudCom(Hoster): __name__ = "SoundcloudCom" __type__ = "hoster" - __version__ = "0.1" + __version__ = "0.10" __pattern__ = r'https?://(?:www\.)?soundcloud\.com/(?P<UID>.*?)/(?P<SID>.*)' diff --git a/pyload/plugins/hoster/StreamCz.py b/pyload/plugins/hoster/StreamCz.py index fcd69ead5..e999e4c25 100644 --- a/pyload/plugins/hoster/StreamCz.py +++ b/pyload/plugins/hoster/StreamCz.py @@ -23,7 +23,7 @@ def getInfo(urls): class StreamCz(Hoster): __name__ = "StreamCz" __type__ = "hoster" - __version__ = "0.2" + __version__ = "0.20" __pattern__ = r'https?://(?:www\.)?stream\.cz/[^/]+/\d+.*' diff --git a/pyload/plugins/hoster/UploadableCh.py b/pyload/plugins/hoster/UploadableCh.py index 0db7196bc..0fafcb6e8 100644 --- a/pyload/plugins/hoster/UploadableCh.py +++ b/pyload/plugins/hoster/UploadableCh.py @@ -53,13 +53,13 @@ class UploadableCh(SimpleHoster): recaptcha = ReCaptcha(self) - challenge, captcha = recaptcha.challenge(self.RECAPTCHA_KEY) + challenge, response = 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_response_field' : response, 'recaptcha_shortencode_field': self.info['ID']}, decode=True) diff --git a/pyload/plugins/hoster/UploadedTo.py b/pyload/plugins/hoster/UploadedTo.py index 016f2c9cf..e8dea32c2 100644 --- a/pyload/plugins/hoster/UploadedTo.py +++ b/pyload/plugins/hoster/UploadedTo.py @@ -206,8 +206,8 @@ class UploadedTo(Hoster): recaptcha = ReCaptcha(self) for _i in xrange(5): - challenge, result = recaptcha.challenge() - options = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": result} + challenge, response = recaptcha.challenge() + options = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": response} self.wait() result = self.load(url, post=options) diff --git a/pyload/plugins/hoster/UpstoreNet.py b/pyload/plugins/hoster/UpstoreNet.py index bd4241532..f7083f820 100644 --- a/pyload/plugins/hoster/UpstoreNet.py +++ b/pyload/plugins/hoster/UpstoreNet.py @@ -52,9 +52,9 @@ class UpstoreNet(SimpleHoster): self.wait(wait_time) # then, handle the captcha - challenge, code = recaptcha.challenge() - post_data['recaptcha_challenge_field'] = challenge - post_data['recaptcha_response_field'] = code + challenge, response = recaptcha.challenge() + post_data.update({'recaptcha_challenge_field': challenge, + 'recaptcha_response_field' : response}) self.html = self.load(self.pyfile.url, post=post_data, decode=True) diff --git a/pyload/plugins/hoster/Vipleech4uCom.py b/pyload/plugins/hoster/Vipleech4uCom.py index c5a444433..c3627b914 100644 --- a/pyload/plugins/hoster/Vipleech4uCom.py +++ b/pyload/plugins/hoster/Vipleech4uCom.py @@ -6,7 +6,7 @@ from pyload.plugins.internal.DeadHoster import DeadHoster, create_getInfo class Vipleech4uCom(DeadHoster): __name__ = "Vipleech4uCom" __type__ = "hoster" - __version__ = "0.2" + __version__ = "0.20" __pattern__ = r'http://(?:www\.)?vipleech4u\.com/manager\.php' diff --git a/pyload/plugins/hoster/XVideosCom.py b/pyload/plugins/hoster/XVideosCom.py index 9ab9e4484..530858bbf 100644 --- a/pyload/plugins/hoster/XVideosCom.py +++ b/pyload/plugins/hoster/XVideosCom.py @@ -10,7 +10,7 @@ from pyload.plugins.internal.Hoster import Hoster class XVideosCom(Hoster): __name__ = "XVideos.com" __type__ = "hoster" - __version__ = "0.1" + __version__ = "0.10" __pattern__ = r'http://(?:www\.)?xvideos\.com/video(\d+)/.*' diff --git a/pyload/plugins/hoster/YoupornCom.py b/pyload/plugins/hoster/YoupornCom.py index 6063e6816..b214d820c 100644 --- a/pyload/plugins/hoster/YoupornCom.py +++ b/pyload/plugins/hoster/YoupornCom.py @@ -8,7 +8,7 @@ from pyload.plugins.internal.Hoster import Hoster class YoupornCom(Hoster): __name__ = "YoupornCom" __type__ = "hoster" - __version__ = "0.2" + __version__ = "0.20" __pattern__ = r'http://(?:www\.)?youporn\.com/watch/.+' diff --git a/pyload/plugins/hoster/ZDF.py b/pyload/plugins/hoster/ZDF.py index 53939ae6c..9917955ec 100644 --- a/pyload/plugins/hoster/ZDF.py +++ b/pyload/plugins/hoster/ZDF.py @@ -11,7 +11,7 @@ from pyload.plugins.internal.Hoster import Hoster class ZDF(Hoster): __name__ = "ZDF Mediathek" __type__ = "hoster" - __version__ = "0.8" + __version__ = "0.80" __pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/\D*(\d+)\D*' diff --git a/pyload/plugins/internal/AbstractExtractor.py b/pyload/plugins/internal/AbstractExtractor.py index 717c91c46..5e09c6755 100644 --- a/pyload/plugins/internal/AbstractExtractor.py +++ b/pyload/plugins/internal/AbstractExtractor.py @@ -14,7 +14,7 @@ class WrongPassword(Exception): class AbtractExtractor(object): __name__ = "AbtractExtractor" - __version__ = "0.1" + __version__ = "0.10" __description__ = """Abtract extractor plugin""" __license__ = "GPLv3" diff --git a/pyload/plugins/internal/OCR.py b/pyload/plugins/internal/OCR.py index 4d435d493..8e60737b6 100644 --- a/pyload/plugins/internal/OCR.py +++ b/pyload/plugins/internal/OCR.py @@ -16,7 +16,7 @@ from os.path import abspath, join class OCR(object): __name__ = "OCR" __type__ = "ocr" - __version__ = "0.01" + __version__ = "0.10" __description__ = """Base OCR plugin""" __license__ = "GPLv3" @@ -79,18 +79,19 @@ class OCR(object): if subset and (digits or lowercase or uppercase): #tmpSub = tempfile.NamedTemporaryFile(suffix=".subset") - tmpSub = open(join("tmp", "tmpSub_%s.subset" % self.__name__), "wb") - tmpSub.write("tessedit_char_whitelist ") - if digits: - tmpSub.write("0123456789") - if lowercase: - tmpSub.write("abcdefghijklmnopqrstuvwxyz") - if uppercase: - tmpSub.write("ABCDEFGHIJKLMNOPQRSTUVWXYZ") - tmpSub.write("\n") - tessparams.append("nobatch") - tessparams.append(abspath(tmpSub.name)) - tmpSub.close() + with open(join("tmp", "tmpSub_%s.subset" % self.__name__), "wb") as tmpSub: + tmpSub.write("tessedit_char_whitelist ") + + if digits: + tmpSub.write("0123456789") + if lowercase: + tmpSub.write("abcdefghijklmnopqrstuvwxyz") + if uppercase: + tmpSub.write("ABCDEFGHIJKLMNOPQRSTUVWXYZ") + + tmpSub.write("\n") + tessparams.append("nobatch") + tessparams.append(abspath(tmpSub.name)) self.logger.debug("run tesseract") self.run(tessparams) diff --git a/pyload/plugins/internal/UnZip.py b/pyload/plugins/internal/UnZip.py index 413c0699e..17c321530 100644 --- a/pyload/plugins/internal/UnZip.py +++ b/pyload/plugins/internal/UnZip.py @@ -8,7 +8,7 @@ from pyload.plugins.internal.AbstractExtractor import AbtractExtractor class UnZip(AbtractExtractor): __name__ = "UnZip" - __version__ = "0.1" + __version__ = "0.10" __description__ = """Zip extractor plugin""" __license__ = "GPLv3" diff --git a/pyload/plugins/ocr/GigasizeCom.py b/pyload/plugins/ocr/GigasizeCom.py index e1f6e8753..c8525d000 100644 --- a/pyload/plugins/ocr/GigasizeCom.py +++ b/pyload/plugins/ocr/GigasizeCom.py @@ -6,7 +6,7 @@ from pyload.plugins.internal.OCR import OCR class GigasizeCom(OCR): __name__ = "GigasizeCom" __type__ = "ocr" - __version__ = "0.1" + __version__ = "0.10" __description__ = """Gigasize.com ocr plugin""" __license__ = "GPLv3" diff --git a/pyload/plugins/ocr/LinksaveIn.py b/pyload/plugins/ocr/LinksaveIn.py index 754bfc39d..d597efc36 100644 --- a/pyload/plugins/ocr/LinksaveIn.py +++ b/pyload/plugins/ocr/LinksaveIn.py @@ -15,7 +15,7 @@ from pyload.plugins.internal.OCR import OCR class LinksaveIn(OCR): __name__ = "LinksaveIn" __type__ = "ocr" - __version__ = "0.1" + __version__ = "0.10" __description__ = """Linksave.in ocr plugin""" __license__ = "GPLv3" diff --git a/pyload/plugins/ocr/NetloadIn.py b/pyload/plugins/ocr/NetloadIn.py index 79a88c27a..2fce55d34 100644 --- a/pyload/plugins/ocr/NetloadIn.py +++ b/pyload/plugins/ocr/NetloadIn.py @@ -6,7 +6,7 @@ from pyload.plugins.internal.OCR import OCR class NetloadIn(OCR): __name__ = "NetloadIn" __type__ = "ocr" - __version__ = "0.1" + __version__ = "0.10" __description__ = """Netload.in ocr plugin""" __license__ = "GPLv3" diff --git a/pyload/plugins/ocr/ShareonlineBiz.py b/pyload/plugins/ocr/ShareonlineBiz.py index 5263f8316..64753cf78 100644 --- a/pyload/plugins/ocr/ShareonlineBiz.py +++ b/pyload/plugins/ocr/ShareonlineBiz.py @@ -6,7 +6,7 @@ from pyload.plugins.internal.OCR import OCR class ShareonlineBiz(OCR): __name__ = "ShareonlineBiz" __type__ = "ocr" - __version__ = "0.1" + __version__ = "0.10" __description__ = """Shareonline.biz ocr plugin""" __license__ = "GPLv3" |