diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-07 01:23:55 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-07 01:23:55 +0200 |
commit | b1759bc440cd6013837697eb8de540914f693ffd (patch) | |
tree | d170caf63d7f65e44d23ea2d91a65759a1665928 /module/plugins/crypter | |
parent | [Plugin] Fix decoding in load method (diff) | |
download | pyload-b1759bc440cd6013837697eb8de540914f693ffd.tar.xz |
No camelCase style anymore
Diffstat (limited to 'module/plugins/crypter')
88 files changed, 490 insertions, 490 deletions
diff --git a/module/plugins/crypter/BitshareComFolder.py b/module/plugins/crypter/BitshareComFolder.py index f0dd9e570..85ada3379 100644 --- a/module/plugins/crypter/BitshareComFolder.py +++ b/module/plugins/crypter/BitshareComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class BitshareComFolder(SimpleCrypter): __name__ = "BitshareComFolder" __type__ = "crypter" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?bitshare\.com/\?d=\w+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), diff --git a/module/plugins/crypter/C1NeonCom.py b/module/plugins/crypter/C1NeonCom.py index 9b6093081..4b577de2e 100644 --- a/module/plugins/crypter/C1NeonCom.py +++ b/module/plugins/crypter/C1NeonCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class C1NeonCom(DeadCrypter): __name__ = "C1NeonCom" __type__ = "crypter" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?c1neon\.com/.+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py index 6938a2225..64a3b4f25 100644 --- a/module/plugins/crypter/ChipDe.py +++ b/module/plugins/crypter/ChipDe.py @@ -7,7 +7,7 @@ from module.plugins.internal.Crypter import Crypter class ChipDe(Crypter): __name__ = "ChipDe" __type__ = "crypter" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'http://(?:www\.)?chip\.de/video/.+\.html' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -26,4 +26,4 @@ class ChipDe(Crypter): self.fail(_("Failed to find the URL")) else: self.urls = [f.group(1)] - self.logDebug("The file URL is %s" % self.urls[0]) + self.log_debug("The file URL is %s" % self.urls[0]) diff --git a/module/plugins/crypter/CloudzillaToFolder.py b/module/plugins/crypter/CloudzillaToFolder.py index 96d7245f1..93bf14716 100644 --- a/module/plugins/crypter/CloudzillaToFolder.py +++ b/module/plugins/crypter/CloudzillaToFolder.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class CloudzillaToFolder(SimpleHoster): __name__ = "CloudzillaToFolder" __type__ = "crypter" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/folder/(?P<ID>[\w^_]+)' @@ -26,10 +26,10 @@ class CloudzillaToFolder(SimpleHoster): PASSWORD_PATTERN = r'<div id="pwd_protected">' - def checkErrors(self): + def check_errors(self): m = re.search(self.PASSWORD_PATTERN, self.html) if m: - self.html = self.load(self.pyfile.url, get={'key': self.getPassword()}) + self.html = self.load(self.pyfile.url, get={'key': self.get_password()}) if re.search(self.PASSWORD_PATTERN, self.html): self.retry(reason="Wrong password") diff --git a/module/plugins/crypter/CrockoComFolder.py b/module/plugins/crypter/CrockoComFolder.py index f56cc449a..913eba821 100644 --- a/module/plugins/crypter/CrockoComFolder.py +++ b/module/plugins/crypter/CrockoComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class CrockoComFolder(SimpleCrypter): __name__ = "CrockoComFolder" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'http://(?:www\.)?crocko\.com/f/.+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), diff --git a/module/plugins/crypter/CryptItCom.py b/module/plugins/crypter/CryptItCom.py index 1c9e841b7..55658c563 100644 --- a/module/plugins/crypter/CryptItCom.py +++ b/module/plugins/crypter/CryptItCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class CryptItCom(DeadCrypter): __name__ = "CryptItCom" __type__ = "crypter" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'http://(?:www\.)?crypt-it\.com/(s|e|d|c)/\w+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/CzshareComFolder.py b/module/plugins/crypter/CzshareComFolder.py index 5b5e6fd27..446440ac4 100644 --- a/module/plugins/crypter/CzshareComFolder.py +++ b/module/plugins/crypter/CzshareComFolder.py @@ -7,7 +7,7 @@ from module.plugins.internal.Crypter import Crypter class CzshareComFolder(Crypter): __name__ = "CzshareComFolder" __type__ = "crypter" - __version__ = "0.21" + __version__ = "0.22" __pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/folders/.+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), diff --git a/module/plugins/crypter/DailymotionComFolder.py b/module/plugins/crypter/DailymotionComFolder.py index e839cf9df..93ff6a0a4 100644 --- a/module/plugins/crypter/DailymotionComFolder.py +++ b/module/plugins/crypter/DailymotionComFolder.py @@ -11,7 +11,7 @@ from module.utils import save_join as fs_join class DailymotionComFolder(Crypter): __name__ = "DailymotionComFolder" __type__ = "crypter" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?dailymotion\.com/((playlists/)?(?P<TYPE>playlist|user)/)?(?P<ID>[\w^_]+)(?(TYPE)|#)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -28,7 +28,7 @@ class DailymotionComFolder(Crypter): return json_loads(html) - def getPlaylistInfo(self, id): + def get_playlist_info(self, id): ref = "playlist/" + id req = {"fields": "name,owner.screenname"} playlist = self.api_response(ref, req) @@ -41,7 +41,7 @@ class DailymotionComFolder(Crypter): return name, owner - def _getPlaylists(self, user_id, page=1): + def _get_playlists(self, user_id, page=1): ref = "user/%s/playlists" % user_id req = {"fields": "id", "page": page, "limit": 100} user = self.api_response(ref, req) @@ -53,15 +53,15 @@ class DailymotionComFolder(Crypter): yield playlist['id'] if user['has_more']: - for item in self._getPlaylists(user_id, page + 1): + for item in self._get_playlists(user_id, page + 1): yield item - def getPlaylists(self, user_id): - return [(id,) + self.getPlaylistInfo(id) for id in self._getPlaylists(user_id)] + def get_playlists(self, user_id): + return [(id,) + self.get_playlist_info(id) for id in self._get_playlists(user_id)] - def _getVideos(self, id, page=1): + def _get_videos(self, id, page=1): ref = "playlist/%s/videos" % id req = {"fields": "url", "page": page, "limit": 100} playlist = self.api_response(ref, req) @@ -73,12 +73,12 @@ class DailymotionComFolder(Crypter): yield video['url'] if playlist['has_more']: - for item in self._getVideos(id, page + 1): + for item in self._get_videos(id, page + 1): yield item - def getVideos(self, playlist_id): - return list(self._getVideos(playlist_id))[::-1] + def get_videos(self, playlist_id): + return list(self._get_videos(playlist_id))[::-1] def decrypt(self, pyfile): @@ -87,19 +87,19 @@ class DailymotionComFolder(Crypter): m_type = m.group('TYPE') if m_type == "playlist": - self.logDebug("Url recognized as Playlist") - p_info = self.getPlaylistInfo(m_id) + self.log_debug("Url recognized as Playlist") + p_info = self.get_playlist_info(m_id) playlists = [(m_id,) + p_info] if p_info else None else: - self.logDebug("Url recognized as Channel") - playlists = self.getPlaylists(m_id) - self.logDebug("%s playlist\s found on channel \"%s\"" % (len(playlists), m_id)) + self.log_debug("Url recognized as Channel") + playlists = self.get_playlists(m_id) + self.log_debug("%s playlist\s found on channel \"%s\"" % (len(playlists), m_id)) if not playlists: self.fail(_("No playlist available")) for p_id, p_name, p_owner in playlists: - p_videos = self.getVideos(p_id) + p_videos = self.get_videos(p_id) p_folder = fs_join(self.core.config.get("general", "download_folder"), p_owner, p_name) - self.logDebug("%s video\s found on playlist \"%s\"" % (len(p_videos), p_name)) + self.log_debug("%s video\s found on playlist \"%s\"" % (len(p_videos), p_name)) self.packages.append((p_name, p_videos, p_folder)) #: folder is NOT recognized by pyload 0.4.9! diff --git a/module/plugins/crypter/DataHuFolder.py b/module/plugins/crypter/DataHuFolder.py index 0b241bf66..9e228472d 100644 --- a/module/plugins/crypter/DataHuFolder.py +++ b/module/plugins/crypter/DataHuFolder.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class DataHuFolder(SimpleCrypter): __name__ = "DataHuFolder" __type__ = "crypter" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'http://(?:www\.)?data\.hu/dir/\w+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -29,11 +29,11 @@ class DataHuFolder(SimpleCrypter): super(DataHuFolder, self).prepare() if u'K\xe9rlek add meg a jelsz\xf3t' in self.html: #: Password protected - password = self.getPassword() + password = self.get_password() if not password: self.fail(_("Password required")) - self.logDebug("The folder is password protected', 'Using password: " + password) + self.log_debug("The folder is password protected', 'Using password: " + password) self.html = self.load(self.pyfile.url, post={'mappa_pass': password}) diff --git a/module/plugins/crypter/DdlstorageComFolder.py b/module/plugins/crypter/DdlstorageComFolder.py index dc6ec1da5..9eb7bb997 100644 --- a/module/plugins/crypter/DdlstorageComFolder.py +++ b/module/plugins/crypter/DdlstorageComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class DdlstorageComFolder(DeadCrypter): __name__ = "DdlstorageComFolder" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?ddlstorage\.com/folder/\w+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/DepositfilesComFolder.py b/module/plugins/crypter/DepositfilesComFolder.py index 46ec265c3..3e283e1ee 100644 --- a/module/plugins/crypter/DepositfilesComFolder.py +++ b/module/plugins/crypter/DepositfilesComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class DepositfilesComFolder(SimpleCrypter): __name__ = "DepositfilesComFolder" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'http://(?:www\.)?depositfiles\.com/folders/\w+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), diff --git a/module/plugins/crypter/Dereferer.py b/module/plugins/crypter/Dereferer.py index 5c73b2622..88d9aab85 100644 --- a/module/plugins/crypter/Dereferer.py +++ b/module/plugins/crypter/Dereferer.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter class Dereferer(SimpleCrypter): __name__ = "Dereferer" __type__ = "crypter" - __version__ = "0.16" + __version__ = "0.17" __pattern__ = r'https?://(?:www\.)?(?:\w+\.)*?(?P<DOMAIN>(?:[\d.]+|[\w\-]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/.*?(?P<LINK>(?:ht|f)tps?://.+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -36,5 +36,5 @@ class Dereferer(SimpleCrypter): self.HOSTER_NAME = "".join(part.capitalize() for part in re.split(r'(\.|\d+)', self.HOSTER_DOMAIN) if part != '.') - def getLinks(self): + def get_links(self): return [re.match(self.__pattern__, self.pyfile.url).group('LINK').strip()] diff --git a/module/plugins/crypter/DevhostStFolder.py b/module/plugins/crypter/DevhostStFolder.py index c9e809cae..2c3f9d46b 100644 --- a/module/plugins/crypter/DevhostStFolder.py +++ b/module/plugins/crypter/DevhostStFolder.py @@ -12,7 +12,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class DevhostStFolder(SimpleCrypter): __name__ = "DevhostStFolder" __type__ = "crypter" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?d-h\.st/users/(?P<USER>\w+)(/\?fld_id=(?P<ID>\d+))?' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -29,11 +29,11 @@ class DevhostStFolder(SimpleCrypter): OFFLINE_PATTERN = r'"/cHP">test\.png<' - def checkNameSize(self, getinfo=True): + def check_name_size(self, getinfo=True): if not self.info or getinfo: - self.logDebug("File info (BEFORE): %s" % self.info) - self.info.update(self.getInfo(self.pyfile.url, self.html)) - self.logDebug("File info (AFTER): %s" % self.info) + self.log_debug("File info (BEFORE): %s" % self.info) + self.info.update(self.get_info(self.pyfile.url, self.html)) + self.log_debug("File info (AFTER): %s" % self.info) try: if self.info['pattern']['ID'] == "0": @@ -49,7 +49,7 @@ class DevhostStFolder(SimpleCrypter): self.pyfile.name = m.group(1) except Exception, e: - self.logDebug(e) + self.log_debug(e) self.pyfile.name = self.info['pattern']['USER'] try: @@ -58,7 +58,7 @@ class DevhostStFolder(SimpleCrypter): except Exception: pass - self.logDebug("File name: %s" % self.pyfile.name, + self.log_debug("File name: %s" % self.pyfile.name, "File folder: %s" % self.pyfile.name) diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index 6ced6a706..44cb881d4 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class DlProtectCom(SimpleCrypter): __name__ = "DlProtectCom" __type__ = "crypter" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'https?://(?:www\.)?dl-protect\.com/((en|fr)/)?\w+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -28,7 +28,7 @@ class DlProtectCom(SimpleCrypter): OFFLINE_PATTERN = r'Unfortunately, the link you are looking for is not found' - def getLinks(self): + def get_links(self): #: Direct link with redirect if not re.match(r"https?://(?:www\.)?dl-protect\.com/.+", self.req.http.lastEffectiveURL): return [self.req.http.lastEffectiveURL] @@ -48,12 +48,12 @@ class DlProtectCom(SimpleCrypter): 'submitform': "Decrypt+link"}) if "Password :" in self.html: - post_req['pwd'] = self.getPassword() + post_req['pwd'] = self.get_password() if "Security Code" in self.html: m = re.search(r'/captcha\.php\?key=(.+?)"', self.html) if m: - captcha_code = self.decryptCaptcha("http://www.dl-protect.com/captcha.php?key=" + m.group(1), imgtype="gif") + captcha_code = self.decrypt_captcha("http://www.dl-protect.com/captcha.php?key=" + m.group(1), imgtype="gif") post_req['secure'] = captcha_code self.html = self.load(self.pyfile.url, post=post_req) diff --git a/module/plugins/crypter/DuckCryptInfo.py b/module/plugins/crypter/DuckCryptInfo.py index 631ed00b7..7541ac1a6 100644 --- a/module/plugins/crypter/DuckCryptInfo.py +++ b/module/plugins/crypter/DuckCryptInfo.py @@ -10,7 +10,7 @@ from module.plugins.internal.Crypter import Crypter class DuckCryptInfo(Crypter): __name__ = "DuckCryptInfo" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?duckcrypt\.info/(folder|wait|link)/(\w+)/?(\w*)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -31,29 +31,29 @@ class DuckCryptInfo(Crypter): if m is None: self.fail(_("Weird error in link")) if str(m.group(1)) == "link": - self.handleLink(url) + self.handle_link(url) else: - self.handleFolder(m) + self.handle_folder(m) - def handleFolder(self, m): + def handle_folder(self, m): html = self.load("http://duckcrypt.info/ajax/auth.php?hash=" + str(m.group(2))) m = re.match(self.__pattern__, html) - self.logDebug("Redirectet to " + str(m.group(0))) + self.log_debug("Redirectet to " + str(m.group(0))) html = self.load(str(m.group(0))) soup = BeautifulSoup(html) cryptlinks = soup.findAll("div", attrs={"class": "folderbox"}) - self.logDebug("Redirectet to " + str(cryptlinks)) + self.log_debug("Redirectet to " + str(cryptlinks)) if not cryptlinks: self.error(_("No link found")) for clink in cryptlinks: if clink.find("a"): - self.handleLink(clink.find("a")['href']) + self.handle_link(clink.find("a")['href']) - def handleLink(self, url): + def handle_link(self, url): html = self.load(url) soup = BeautifulSoup(html) self.urls = [soup.find("iframe")['src']] if not self.urls: - self.logInfo(_("No link found")) + self.log_info(_("No link found")) diff --git a/module/plugins/crypter/DuploadOrgFolder.py b/module/plugins/crypter/DuploadOrgFolder.py index d505806b7..234e3cb3c 100644 --- a/module/plugins/crypter/DuploadOrgFolder.py +++ b/module/plugins/crypter/DuploadOrgFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class DuploadOrgFolder(DeadCrypter): __name__ = "DuploadOrgFolder" __type__ = "crypter" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'http://(?:www\.)?dupload\.org/folder/\d+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/EasybytezComFolder.py b/module/plugins/crypter/EasybytezComFolder.py index fdd3d4ff4..62322e330 100644 --- a/module/plugins/crypter/EasybytezComFolder.py +++ b/module/plugins/crypter/EasybytezComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo class EasybytezComFolder(XFSCrypter): __name__ = "EasybytezComFolder" __type__ = "crypter" - __version__ = "0.10" + __version__ = "0.11" __pattern__ = r'http://(?:www\.)?easybytez\.com/users/\d+/\d+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), diff --git a/module/plugins/crypter/EmbeduploadCom.py b/module/plugins/crypter/EmbeduploadCom.py index 3a830331f..6f98e6915 100644 --- a/module/plugins/crypter/EmbeduploadCom.py +++ b/module/plugins/crypter/EmbeduploadCom.py @@ -8,7 +8,7 @@ from module.network.HTTPRequest import BadHeader class EmbeduploadCom(Crypter): __name__ = "EmbeduploadCom" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?embedupload\.com/\?d=.+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True ), @@ -30,25 +30,25 @@ class EmbeduploadCom(Crypter): m = re.findall(self.LINK_PATTERN, self.html) if m: - prefered_set = set(self.getConfig('preferedHoster').split('|')) + prefered_set = set(self.get_config('preferedHoster').split('|')) prefered_set = map(lambda s: s.lower().split('.')[0], prefered_set) - self.logDebug("PF: %s" % prefered_set) + self.log_debug("PF: %s" % prefered_set) tmp_links.extend(x[1] for x in m if x[0] in prefered_set) - self.urls = self.getLocation(tmp_links) + self.urls = self.get_location(tmp_links) if not self.urls: - ignored_set = set(self.getConfig('ignoredHoster').split('|')) + ignored_set = set(self.get_config('ignoredHoster').split('|')) ignored_set = map(lambda s: s.lower().split('.')[0], ignored_set) - self.logDebug("IG: %s" % ignored_set) + self.log_debug("IG: %s" % ignored_set) tmp_links.extend(x[1] for x in m if x[0] not in ignored_set) - self.urls = self.getLocation(tmp_links) + self.urls = self.get_location(tmp_links) - def getLocation(self, tmp_links): + def get_location(self, tmp_links): new_links = [] for link in tmp_links: try: diff --git a/module/plugins/crypter/FilebeerInfoFolder.py b/module/plugins/crypter/FilebeerInfoFolder.py index 5b401c555..8529f371d 100644 --- a/module/plugins/crypter/FilebeerInfoFolder.py +++ b/module/plugins/crypter/FilebeerInfoFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class FilebeerInfoFolder(DeadCrypter): __name__ = "FilebeerInfoFolder" __type__ = "crypter" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'http://(?:www\.)?filebeer\.info/\d*~f\w+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/FilecloudIoFolder.py b/module/plugins/crypter/FilecloudIoFolder.py index f900f4910..6eb26abb3 100644 --- a/module/plugins/crypter/FilecloudIoFolder.py +++ b/module/plugins/crypter/FilecloudIoFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class FilecloudIoFolder(SimpleCrypter): __name__ = "FilecloudIoFolder" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?(filecloud\.io|ifile\.it)/_\w+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 769877802..341b1e13f 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -16,7 +16,7 @@ from module.plugins.internal.ReCaptcha import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.16" + __version__ = "0.17" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -47,36 +47,36 @@ class FilecryptCc(Crypter): if "content notfound" in self.html: #@NOTE: "content notfound" is NOT a typo self.offline() - self.handlePasswordProtection() - self.handleCaptcha() - self.handleMirrorPages() + self.handle_password_protection() + self.handle_captcha() + self.handle_mirror_pages() - for handle in (self.handleCNL, self.handleWeblinks, self.handleDlcContainer): + for handle in (self.handle_CNL, self.handle_weblinks, self.handle_dlc_container): handle() if self.links: self.packages = [(pyfile.package().name, self.links, pyfile.package().name)] return - def handleMirrorPages(self): - if "mirror=" not in self.siteWithLinks: + def handle_mirror_pages(self): + if "mirror=" not in self.site_with_links: return - mirror = re.findall(self.MIRROR_PAGE_PATTERN, self.siteWithLinks) + mirror = re.findall(self.MIRROR_PAGE_PATTERN, self.site_with_links) - self.logInfo(_("Found %d mirrors") % len(mirror)) + self.log_info(_("Found %d mirrors") % len(mirror)) for i in mirror[1:]: - self.siteWithLinks = self.siteWithLinks + self.load(i).decode("utf-8", "replace") + self.site_with_links = self.site_with_links + self.load(i).decode("utf-8", "replace") - def handlePasswordProtection(self): + def handle_password_protection(self): if '<input type="text" name="password"' not in self.html: return - self.logInfo(_("Folder is password protected")) + self.log_info(_("Folder is password protected")) - password = self.getPassword() + password = self.get_password() if not password: self.fail(_("Please enter the password in package section and try again")) @@ -84,26 +84,26 @@ class FilecryptCc(Crypter): self.html = self.load(self.pyfile.url, post={"password": password}) - def handleCaptcha(self): + def handle_captcha(self): m = re.search(self.CAPTCHA_PATTERN, self.html) m2 = re.search(self.CIRCLE_CAPTCHA_PATTERN, self.html) if m: #: normal captcha - self.logDebug("Captcha-URL: %s" % m.group(1)) + self.log_debug("Captcha-URL: %s" % m.group(1)) - captcha_code = self.decryptCaptcha(urlparse.urljoin(self.base_url, m.group(1)), + captcha_code = self.decrypt_captcha(urlparse.urljoin(self.base_url, m.group(1)), forceUser=True, imgtype="gif") - self.siteWithLinks = self.load(self.pyfile.url, + self.site_with_links = self.load(self.pyfile.url, post={'recaptcha_response_field': captcha_code}) elif m2: #: circle captcha - self.logDebug("Captcha-URL: %s" % m2.group(1)) + self.log_debug("Captcha-URL: %s" % m2.group(1)) - captcha_code = self.decryptCaptcha('%s%s?c=abc' %(self.base_url, m2.group(1)), + captcha_code = self.decrypt_captcha('%s%s?c=abc' %(self.base_url, m2.group(1)), result_type='positional') - self.siteWithLinks = self.load(self.pyfile.url, + self.site_with_links = self.load(self.pyfile.url, post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}) else: @@ -112,19 +112,19 @@ class FilecryptCc(Crypter): if captcha_key: response, challenge = recaptcha.challenge(captcha_key) - self.siteWithLinks = self.load(self.pyfile.url, + self.site_with_links = self.load(self.pyfile.url, post={'g-recaptcha-response': response}) else: - self.logInfo(_("No captcha found")) - self.siteWithLinks = self.html + self.log_info(_("No captcha found")) + self.site_with_links = self.html - if "recaptcha_image" in self.siteWithLinks or "data-sitekey" in self.siteWithLinks: - self.invalidCaptcha() + if "recaptcha_image" in self.site_with_links or "data-sitekey" in self.site_with_links: + self.invalid_captcha() self.retry() - def handleDlcContainer(self): - dlc = re.findall(self.DLC_LINK_PATTERN, self.siteWithLinks) + def handle_dlc_container(self): + dlc = re.findall(self.DLC_LINK_PATTERN, self.site_with_links) if not dlc: return @@ -133,9 +133,9 @@ class FilecryptCc(Crypter): self.links.append("%s/DLC/%s.dlc" % (self.base_url, i)) - def handleWeblinks(self): + def handle_weblinks(self): try: - weblinks = re.findall(self.WEBLINK_PATTERN, self.siteWithLinks) + weblinks = re.findall(self.WEBLINK_PATTERN, self.site_with_links) for link in weblinks: res = self.load("%s/Link/%s.html" % (self.base_url, link)) @@ -144,22 +144,22 @@ class FilecryptCc(Crypter): self.links.append(res2['location']) except Exception, e: - self.logDebug("Error decrypting weblinks: %s" % e) + self.log_debug("Error decrypting weblinks: %s" % e) - def handleCNL(self): + def handle_CNL(self): try: - vjk = re.findall('<input type="hidden" name="jk" value="function f\(\){ return \'(.*)\';}">', self.siteWithLinks) - vcrypted = re.findall('<input type="hidden" name="crypted" value="(.*)">', self.siteWithLinks) + vjk = re.findall('<input type="hidden" name="jk" value="function f\(\){ return \'(.*)\';}">', self.site_with_links) + vcrypted = re.findall('<input type="hidden" name="crypted" value="(.*)">', self.site_with_links) for i in xrange(len(vcrypted)): - self.links.extend(self._getLinks(vcrypted[i], vjk[i])) + self.links.extend(self._get_links(vcrypted[i], vjk[i])) except Exception, e: - self.logDebug("Error decrypting CNL: %s" % e) + self.log_debug("Error decrypting CNL: %s" % e) - def _getLinks(self, crypted, jk): + def _get_links(self, crypted, jk): #: Get key key = binascii.unhexlify(str(jk)) diff --git a/module/plugins/crypter/FilefactoryComFolder.py b/module/plugins/crypter/FilefactoryComFolder.py index c0cd028cc..14d8a6827 100644 --- a/module/plugins/crypter/FilefactoryComFolder.py +++ b/module/plugins/crypter/FilefactoryComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class FilefactoryComFolder(SimpleCrypter): __name__ = "FilefactoryComFolder" __type__ = "crypter" - __version__ = "0.32" + __version__ = "0.33" __pattern__ = r'https?://(?:www\.)?filefactory\.com/(?:f|folder)/\w+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -25,7 +25,7 @@ class FilefactoryComFolder(SimpleCrypter): PAGES_PATTERN = r'data-paginator-totalPages="(\d+)' - def loadPage(self, page_n): + def load_page(self, page_n): return self.load(self.pyfile.url, get={'page': page_n, 'show': 100}) diff --git a/module/plugins/crypter/FilerNetFolder.py b/module/plugins/crypter/FilerNetFolder.py index e2b44e868..c95a2b490 100644 --- a/module/plugins/crypter/FilerNetFolder.py +++ b/module/plugins/crypter/FilerNetFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class FilerNetFolder(SimpleCrypter): __name__ = "FilerNetFolder" __type__ = "crypter" - __version__ = "0.42" + __version__ = "0.43" __pattern__ = r'https?://filer\.net/folder/\w{16}' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), diff --git a/module/plugins/crypter/FileserveComFolder.py b/module/plugins/crypter/FileserveComFolder.py index edd7562df..2c97cddde 100644 --- a/module/plugins/crypter/FileserveComFolder.py +++ b/module/plugins/crypter/FileserveComFolder.py @@ -8,7 +8,7 @@ from module.plugins.internal.Crypter import Crypter class FileserveComFolder(Crypter): __name__ = "FileserveComFolder" __type__ = "crypter" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'http://(?:www\.)?fileserve\.com/list/\w+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), diff --git a/module/plugins/crypter/FilesonicComFolder.py b/module/plugins/crypter/FilesonicComFolder.py index 6cd4d8b8c..59db89156 100644 --- a/module/plugins/crypter/FilesonicComFolder.py +++ b/module/plugins/crypter/FilesonicComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class FilesonicComFolder(DeadCrypter): __name__ = "FilesonicComFolder" __type__ = "crypter" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'http://(?:www\.)?filesonic\.com/folder/\w+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/FilestubeCom.py b/module/plugins/crypter/FilestubeCom.py index 9e6b5c114..60d15168d 100644 --- a/module/plugins/crypter/FilestubeCom.py +++ b/module/plugins/crypter/FilestubeCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class FilestubeCom(SimpleCrypter): __name__ = "FilestubeCom" __type__ = "crypter" - __version__ = "0.06" + __version__ = "0.07" __pattern__ = r'http://(?:www\.)?filestube\.(?:com|to)/\w+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), diff --git a/module/plugins/crypter/FiletramCom.py b/module/plugins/crypter/FiletramCom.py index b012d35bc..baf037551 100644 --- a/module/plugins/crypter/FiletramCom.py +++ b/module/plugins/crypter/FiletramCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class FiletramCom(SimpleCrypter): __name__ = "FiletramCom" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?filetram\.com/[^/]+/.+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), diff --git a/module/plugins/crypter/FiredriveComFolder.py b/module/plugins/crypter/FiredriveComFolder.py index 792f3198b..52fa92636 100644 --- a/module/plugins/crypter/FiredriveComFolder.py +++ b/module/plugins/crypter/FiredriveComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class FiredriveComFolder(DeadCrypter): __name__ = "FiredriveComFolder" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?(firedrive|putlocker)\.com/share/.+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/FourChanOrg.py b/module/plugins/crypter/FourChanOrg.py index f3195fe02..ac0cdc042 100644 --- a/module/plugins/crypter/FourChanOrg.py +++ b/module/plugins/crypter/FourChanOrg.py @@ -11,7 +11,7 @@ from module.plugins.internal.Crypter import Crypter class FourChanOrg(Crypter): __name__ = "FourChanOrg" __type__ = "crypter" - __version__ = "0.32" + __version__ = "0.33" __pattern__ = r'http://(?:www\.)?boards\.4chan\.org/\w+/res/(\d+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), diff --git a/module/plugins/crypter/FreakhareComFolder.py b/module/plugins/crypter/FreakhareComFolder.py index 59fa9cf32..ad2ca2040 100644 --- a/module/plugins/crypter/FreakhareComFolder.py +++ b/module/plugins/crypter/FreakhareComFolder.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class FreakhareComFolder(SimpleCrypter): __name__ = "FreakhareComFolder" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?freakshare\.com/folder/.+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -25,7 +25,7 @@ class FreakhareComFolder(SimpleCrypter): PAGES_PATTERN = r'Pages: +(\d+)' - def loadPage(self, page_n): + def load_page(self, page_n): if not hasattr(self, 'f_id') and not hasattr(self, 'f_md5'): m = re.search(r'http://freakshare.com/\?x=folder&f_id=(\d+)&f_md5=(\w+)', self.html) if m: diff --git a/module/plugins/crypter/FreetexthostCom.py b/module/plugins/crypter/FreetexthostCom.py index cf6fbb8a4..a1b063912 100644 --- a/module/plugins/crypter/FreetexthostCom.py +++ b/module/plugins/crypter/FreetexthostCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class FreetexthostCom(SimpleCrypter): __name__ = "FreetexthostCom" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'http://(?:www\.)?freetexthost\.com/\w+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -20,7 +20,7 @@ class FreetexthostCom(SimpleCrypter): __authors__ = [("stickell", "l.stickell@yahoo.it")] - def getLinks(self): + def get_links(self): m = re.search(r'<div id="contentsinner">\s*(.+)<div class="viewcount">', self.html, re.S) if m is None: self.error(_("Unable to extract links")) diff --git a/module/plugins/crypter/FshareVnFolder.py b/module/plugins/crypter/FshareVnFolder.py index bbee53337..e03f8a65e 100644 --- a/module/plugins/crypter/FshareVnFolder.py +++ b/module/plugins/crypter/FshareVnFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class FshareVnFolder(SimpleCrypter): __name__ = "FshareVnFolder" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'http://(?:www\.)?fshare\.vn/folder/.+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), diff --git a/module/plugins/crypter/FurLy.py b/module/plugins/crypter/FurLy.py index b8e9332e2..223cc7db3 100644 --- a/module/plugins/crypter/FurLy.py +++ b/module/plugins/crypter/FurLy.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class FurLy(SimpleCrypter): __name__ = "FurLy" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'http://(?:www\.)?fur\.ly/(\d/)?\w+' diff --git a/module/plugins/crypter/Go4UpCom.py b/module/plugins/crypter/Go4UpCom.py index 22f31f6f6..dc47d8cfa 100644 --- a/module/plugins/crypter/Go4UpCom.py +++ b/module/plugins/crypter/Go4UpCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class Go4UpCom(SimpleCrypter): __name__ = "Go4UpCom" __type__ = "crypter" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'http://go4up\.com/(dl/\w{12}|rd/\w{12}/\d+)' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -29,7 +29,7 @@ class Go4UpCom(SimpleCrypter): OFFLINE_PATTERN = r'>\s*(404 Page Not Found|File not Found|Mirror does not exist)' - def getLinks(self): + def get_links(self): links = [] m = re.search(r'(/download/gethosts/.+?)"', self.html) diff --git a/module/plugins/crypter/GooGl.py b/module/plugins/crypter/GooGl.py index b36e22884..9bc03532e 100644 --- a/module/plugins/crypter/GooGl.py +++ b/module/plugins/crypter/GooGl.py @@ -7,7 +7,7 @@ from module.common.json_layer import json_loads class GooGl(SimpleCrypter): __name__ = "GooGl" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?goo\.gl/([a-zA-Z]+/)?\w+' @@ -22,9 +22,9 @@ class GooGl(SimpleCrypter): OFFLINE_PATTERN = r'has been disabled|does not exist' - def getLinks(self): + def get_links(self): rep = self.load(self.API_URL, get={'shortUrl': self.pyfile.url}) - self.logDebug("JSON data: " + rep) + self.log_debug("JSON data: " + rep) rep = json_loads(rep) return [rep['longUrl']] if "longUrl" in rep else None diff --git a/module/plugins/crypter/GoogledriveComFolder.py b/module/plugins/crypter/GoogledriveComFolder.py index 70898b313..c93eb6a5e 100644 --- a/module/plugins/crypter/GoogledriveComFolder.py +++ b/module/plugins/crypter/GoogledriveComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class GoogledriveComFolder(SimpleCrypter): __name__ = "GoogledriveCom" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'https?://(?:www\.)?drive\.google\.com/folderview\?.*id=\w+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), #: Overrides core.config['general']['folder_per_package'] diff --git a/module/plugins/crypter/HoerbuchIn.py b/module/plugins/crypter/HoerbuchIn.py index 09749eba6..bf313dd99 100644 --- a/module/plugins/crypter/HoerbuchIn.py +++ b/module/plugins/crypter/HoerbuchIn.py @@ -10,7 +10,7 @@ from module.plugins.internal.Crypter import Crypter class HoerbuchIn(Crypter): __name__ = "HoerbuchIn" __type__ = "crypter" - __version__ = "0.61" + __version__ = "0.62" __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), @@ -36,14 +36,14 @@ class HoerbuchIn(Crypter): abookname = soup.find("a", attrs={"rel": "bookmark"}).text for a in soup.findAll("a", attrs={"href": self.protection}): package = "%s (%s)" % (abookname, a.previousSibling.previousSibling.text[:-1]) - links = self.decryptFolder(a['href']) + links = self.decrypt_folder(a['href']) self.packages.append((package, links, package)) else: - self.urls = self.decryptFolder(pyfile.url) + self.urls = self.decrypt_folder(pyfile.url) - def decryptFolder(self, url): + def decrypt_folder(self, url): m = self.protection.search(url) if m is None: self.fail(_("Bad URL")) diff --git a/module/plugins/crypter/HotfileComFolder.py b/module/plugins/crypter/HotfileComFolder.py index f1dd56228..1a504c1c7 100644 --- a/module/plugins/crypter/HotfileComFolder.py +++ b/module/plugins/crypter/HotfileComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class HotfileComFolder(DeadCrypter): __name__ = "HotfileComFolder" __type__ = "crypter" - __version__ = "0.30" + __version__ = "0.31" __pattern__ = r'https?://(?:www\.)?hotfile\.com/list/\w+/\w+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/ILoadTo.py b/module/plugins/crypter/ILoadTo.py index 4c7387739..c1eb8ddb1 100644 --- a/module/plugins/crypter/ILoadTo.py +++ b/module/plugins/crypter/ILoadTo.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class ILoadTo(DeadCrypter): __name__ = "ILoadTo" __type__ = "crypter" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'http://(?:www\.)?iload\.to/go/\d+-[\w.-]+/' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/ImgurComAlbum.py b/module/plugins/crypter/ImgurComAlbum.py index 9ef7797af..9226e025e 100644 --- a/module/plugins/crypter/ImgurComAlbum.py +++ b/module/plugins/crypter/ImgurComAlbum.py @@ -7,7 +7,7 @@ from module.utils import uniqify class ImgurComAlbum(SimpleCrypter): __name__ = "ImgurComAlbum" __type__ = "crypter" - __version__ = "0.51" + __version__ = "0.52" __pattern__ = r'https?://(?:www\.|m\.)?imgur\.com/(a|gallery|)/?\w{5,7}' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -23,7 +23,7 @@ class ImgurComAlbum(SimpleCrypter): LINK_PATTERN = r'i\.imgur\.com/\w{7}s?\.(?:jpeg|jpg|png|gif|apng)' - def getLinks(self): + def get_links(self): f = lambda url: "http://" + re.sub(r'(\w{7})s\.', r'\1.', url) return uniqify(map(f, re.findall(self.LINK_PATTERN, self.html))) diff --git a/module/plugins/crypter/LetitbitNetFolder.py b/module/plugins/crypter/LetitbitNetFolder.py index e98b1ebc3..6aa9e42a9 100644 --- a/module/plugins/crypter/LetitbitNetFolder.py +++ b/module/plugins/crypter/LetitbitNetFolder.py @@ -7,7 +7,7 @@ from module.plugins.internal.Crypter import Crypter class LetitbitNetFolder(Crypter): __name__ = "LetitbitNetFolder" __type__ = "crypter" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'http://(?:www\.)?letitbit\.net/folder/\w+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index e889ca154..44ca502a9 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -14,7 +14,7 @@ from module.utils import html_unescape class LinkCryptWs(Crypter): __name__ = "LinkCryptWs" __type__ = "crypter" - __version__ = "0.09" + __version__ = "0.10" __pattern__ = r'http://(?:www\.)?linkcrypt\.ws/(dir|container)/(?P<ID>\w+)' @@ -52,34 +52,34 @@ class LinkCryptWs(Crypter): self.prepare() - if not self.isOnline(): + if not self.is_online(): self.offline() - if self.isKeyCaptchaProtected(): + if self.is_key_captcha_protected(): self.retry(8, 15, _("Can't handle Key-Captcha")) - if self.isCaptchaProtected(): + if self.is_captcha_protected(): self.captcha = True - self.unlockCaptchaProtection() - self.handleCaptchaErrors() + self.unlock_captcha_protection() + self.handle_captcha_errors() #: Check for protection - if self.isPasswordProtected(): - self.unlockPasswordProtection() - self.handleErrors() + if self.is_password_protected(): + self.unlock_password_protection() + self.handle_errors() #: get unrar password self.getunrarpw() #: Get package name and folder - package_name, folder_name = self.getPackageInfo() + package_name, folder_name = self.get_package_info() - #get the container definitions from script section + # get the container definitions from script section self.get_container_html() #: Extract package links for type in self.sources: - links = self.handleLinkSource(type) + links = self.handle_link_source(type) if links: self.links.extend(links) @@ -89,59 +89,59 @@ class LinkCryptWs(Crypter): self.packages = [(package_name, self.links, folder_name)] - def isOnline(self): + def is_online(self): if "<title>Linkcrypt.ws // Error 404</title>" in self.html: - self.logDebug("Folder doesn't exist anymore") + self.log_debug("Folder doesn't exist anymore") return False else: return True - def isPasswordProtected(self): + def is_password_protected(self): if "Authorizing" in self.html: - self.logDebug("Links are password protected") + self.log_debug("Links are password protected") return True else: return False - def isCaptchaProtected(self): + def is_captcha_protected(self): if 'id="captcha">' in self.html: - self.logDebug("Links are captcha protected") + self.log_debug("Links are captcha protected") return True else: return False - def isKeyCaptchaProtected(self): + def is_key_captcha_protected(self): if re.search(r'>If the folder does not open after klick on <', self.html, re.I): return True else: return False - def unlockPasswordProtection(self): - password = self.getPassword() + def unlock_password_protection(self): + password = self.get_password() if password: - self.logDebug("Submitting password [%s] for protected links" % password) + self.log_debug("Submitting password [%s] for protected links" % password) self.html = self.load(self.pyfile.url, post={"password": password, 'x': "0", 'y': "0"}) else: self.fail(_("Folder is password protected")) - def unlockCaptchaProtection(self): + def unlock_captcha_protection(self): captcha_url = re.search(r'<form.*?id\s*?=\s*?"captcha"[^>]*?>.*?<\s*?input.*?src="(.+?)"', self.html, re.I | re.S).group(1) - captcha_code = self.decryptCaptcha(captcha_url, forceUser=True, imgtype="gif", result_type='positional') + captcha_code = self.decrypt_captcha(captcha_url, forceUser=True, imgtype="gif", result_type='positional') self.html = self.load(self.pyfile.url, post={"x": captcha_code[0], "y": captcha_code[1]}) - def getPackageInfo(self): + def get_package_info(self): name = self.pyfile.package().name folder = self.pyfile.package().folder - self.logDebug("Defaulting to pyfile name [%s] and folder [%s] for package" % (name, folder)) + self.log_debug("Defaulting to pyfile name [%s] and folder [%s] for package" % (name, folder)) return name, folder @@ -154,46 +154,46 @@ class LinkCryptWs(Crypter): unrarpw = sitein[indexi:indexe] if not (unrarpw == "Password" or "Dateipasswort") : - self.logDebug("File password set to: [%s]"% unrarpw) + self.log_debug("File password set to: [%s]"% unrarpw) self.pyfile.package().password = unrarpw - def handleErrors(self): - if self.isPasswordProtected(): + def handle_errors(self): + if self.is_password_protected(): self.fail(_("Incorrect password")) - def handleCaptchaErrors(self): + def handle_captcha_errors(self): if self.captcha: if "Your choice was wrong!" in self.html: - self.invalidCaptcha() + self.invalid_captcha() self.retry() else: - self.correctCaptcha() + self.correct_captcha() - def handleLinkSource(self, type): + def handle_link_source(self, type): if type == 'cnl': - return self.handleCNL2() + return self.handle_CNL2() elif type == 'web': - return self.handleWebLinks() + return self.handle_web_links() elif type in ('rsdf', 'ccf', 'dlc'): - return self.handleContainer(type) + return self.handle_container(type) else: self.fail(_("Unknown source type: %s") % type) #@TODO: Replace with self.error in 0.4.10 - def handleWebLinks(self): - self.logDebug("Search for Web links ") + def handle_web_links(self): + self.log_debug("Search for Web links ") package_links = [] pattern = r'<form action="http://linkcrypt.ws/out.html"[^>]*?>.*?<input[^>]*?value="(.+?)"[^>]*?name="file"' ids = re.findall(pattern, self.html, re.I | re.S) - self.logDebug("Decrypting %d Web links" % len(ids)) + self.log_debug("Decrypting %d Web links" % len(ids)) for idx, weblink_id in enumerate(ids): try: @@ -208,7 +208,7 @@ class LinkCryptWs(Crypter): package_links.append(link2) except Exception, detail: - self.logDebug("Error decrypting Web link %s, %s" % (weblink_id, detail)) + self.log_debug("Error decrypting Web link %s, %s" % (weblink_id, detail)) return package_links @@ -228,11 +228,11 @@ class LinkCryptWs(Crypter): return self.js.eval(line.replace('{}))',"{}).replace('document.open();document.write','').replace(';document.close();',''))")) - def handleContainer(self, type): + def handle_container(self, type): package_links = [] type = type.lower() - self.logDebug('Search for %s Container links' % type.upper()) + self.log_debug('Search for %s Container links' % type.upper()) if not type.isalnum(): #: check to prevent broken re-pattern (cnl2, rsdf, ccf, dlc, web are all alpha-numeric) self.fail(_("Unknown container type: %s") % type) #@TODO: Replace with self.error in 0.4.10 @@ -245,18 +245,18 @@ class LinkCryptWs(Crypter): if not clink: continue - self.logDebug("clink avaible") + self.log_debug("clink avaible") - package_name, folder_name = self.getPackageInfo() - self.logDebug("Added package with name %s.%s and container link %s" %( package_name, type, clink.group(1))) + package_name, folder_name = self.get_package_info() + self.log_debug("Added package with name %s.%s and container link %s" %( package_name, type, clink.group(1))) self.core.api.uploadContainer( "%s.%s" %(package_name, type), self.load(clink.group(1))) return "Found it" return package_links - def handleCNL2(self): - self.logDebug("Search for CNL links") + def handle_CNL2(self): + self.log_debug("Search for CNL links") package_links = [] cnl_line = None @@ -267,21 +267,21 @@ class LinkCryptWs(Crypter): break if cnl_line: - self.logDebug("cnl_line gefunden") + self.log_debug("cnl_line gefunden") try: cnl_section = self.handle_javascript(cnl_line) - (vcrypted, vjk) = self._getCipherParams(cnl_section) + (vcrypted, vjk) = self._get_cipher_params(cnl_section) for (crypted, jk) in zip(vcrypted, vjk): - package_links.extend(self._getLinks(crypted, jk)) + package_links.extend(self._get_links(crypted, jk)) except Exception: - self.logError(_("Unable to decrypt CNL links (JS Error) try to get over links")) - return self.handleWebLinks() + self.log_error(_("Unable to decrypt CNL links (JS Error) try to get over links")) + return self.handle_web_links() return package_links - def _getCipherParams(self, cnl_section): + def _get_cipher_params(self, cnl_section): #: Get jk jk_re = r'<INPUT.*?NAME="%s".*?VALUE="(.*?)"' % LinkCryptWs.JK_KEY vjk = re.findall(jk_re, cnl_section) @@ -291,16 +291,16 @@ class LinkCryptWs(Crypter): vcrypted = re.findall(crypted_re, cnl_section) #: Log and return - self.logDebug("Detected %d crypted blocks" % len(vcrypted)) + self.log_debug("Detected %d crypted blocks" % len(vcrypted)) return vcrypted, vjk - def _getLinks(self, crypted, jk): + def _get_links(self, crypted, jk): #: Get key jreturn = self.js.eval("%s f()" % jk) key = binascii.unhexlify(jreturn) - self.logDebug("JsEngine returns value [%s]" % jreturn) + self.log_debug("JsEngine returns value [%s]" % jreturn) #: Decrypt Key = key @@ -313,6 +313,6 @@ class LinkCryptWs(Crypter): links = filter(bool, text.split('\n')) #: Log and return - self.logDebug("Package has %d links" % len(links)) + self.log_debug("Package has %d links" % len(links)) return links diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py index dce74b689..29cceeedf 100644 --- a/module/plugins/crypter/LinkSaveIn.py +++ b/module/plugins/crypter/LinkSaveIn.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class LinkSaveIn(SimpleCrypter): __name__ = "LinkSaveIn" __type__ = "crypter" - __version__ = "2.05" + __version__ = "2.06" __pattern__ = r'https?://(?:www\.)?linksave\.in/\w+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index c8de44157..b56a1dd57 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.Crypter import Crypter class LinkdecrypterCom(Crypter): __name__ = "LinkdecrypterCom" __type__ = "crypter" - __version__ = "0.30" + __version__ = "0.31" __pattern__ = r'^unmatchable$' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -27,7 +27,7 @@ class LinkdecrypterCom(Crypter): def setup(self): - self.password = self.getPassword() + self.password = self.get_password() self.req.setOption("timeout", 300) @@ -49,9 +49,9 @@ class LinkdecrypterCom(Crypter): m = re.search(r"<p><i><b>([^<]+)</b></i></p>", self.html) msg = m.group(1) if m else "" - self.logInfo(_("Captcha protected link"), result_type, msg) + self.log_info(_("Captcha protected link"), result_type, msg) - captcha = self.decryptCaptcha(captcha_url, result_type=result_type) + captcha = self.decrypt_captcha(captcha_url, result_type=result_type) if result_type == "positional": captcha = "%d|%d" % captcha self.html = self.load('http://linkdecrypter.com/', post={"captcha": captcha}) @@ -59,7 +59,7 @@ class LinkdecrypterCom(Crypter): elif self.PASSWORD_PATTERN in self.html: if self.password: - self.logInfo(_("Password protected link")) + self.log_info(_("Password protected link")) self.html = self.load('http://linkdecrypter.com/', post={'password': self.password}) else: self.fail(_("Missing password")) diff --git a/module/plugins/crypter/LixIn.py b/module/plugins/crypter/LixIn.py index 2b4c2071c..a86396a25 100644 --- a/module/plugins/crypter/LixIn.py +++ b/module/plugins/crypter/LixIn.py @@ -9,7 +9,7 @@ from module.plugins.internal.Crypter import Crypter class LixIn(Crypter): __name__ = "LixIn" __type__ = "crypter" - __version__ = "0.23" + __version__ = "0.24" __pattern__ = r'http://(?:www\.)?lix\.in/(?P<ID>.+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -33,7 +33,7 @@ class LixIn(Crypter): self.error(_("Unable to identify file ID")) id = m.group('ID') - self.logDebug("File id is %s" % id) + self.log_debug("File id is %s" % id) self.html = self.load(url) @@ -46,12 +46,12 @@ class LixIn(Crypter): for _i in xrange(5): m = re.search(self.CAPTCHA_PATTERN, self.html) if m: - self.logDebug("Trying captcha") - captcharesult = self.decryptCaptcha(urlparse.urljoin("http://lix.in/", m.group(1))) + self.log_debug("Trying captcha") + captcharesult = self.decrypt_captcha(urlparse.urljoin("http://lix.in/", m.group(1))) self.html = self.load(url, post={"capt": captcharesult, "submit": "submit", "tiny": id}) else: - self.logDebug("No captcha/captcha solved") + self.log_debug("No captcha/captcha solved") else: self.html = self.load(url, post={"submit": "submit", "tiny": id}) @@ -60,4 +60,4 @@ class LixIn(Crypter): self.error(_("Unable to find destination url")) else: self.urls = [m.group(1)] - self.logDebug("Found link %s, adding to package" % self.urls[0]) + self.log_debug("Found link %s, adding to package" % self.urls[0]) diff --git a/module/plugins/crypter/LofCc.py b/module/plugins/crypter/LofCc.py index 62e05f299..475c6c0a8 100644 --- a/module/plugins/crypter/LofCc.py +++ b/module/plugins/crypter/LofCc.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class LofCc(DeadCrypter): __name__ = "LofCc" __type__ = "crypter" - __version__ = "0.21" + __version__ = "0.22" __pattern__ = r'http://(?:www\.)?lof\.cc/(.+)' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/MBLinkInfo.py b/module/plugins/crypter/MBLinkInfo.py index 7ff400f7e..06856b064 100644 --- a/module/plugins/crypter/MBLinkInfo.py +++ b/module/plugins/crypter/MBLinkInfo.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class MBLinkInfo(DeadCrypter): __name__ = "MBLinkInfo" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?mblink\.info/?\?id=(\d+)' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/MediafireComFolder.py b/module/plugins/crypter/MediafireComFolder.py index dd23df7ca..9ec8f9efe 100644 --- a/module/plugins/crypter/MediafireComFolder.py +++ b/module/plugins/crypter/MediafireComFolder.py @@ -9,7 +9,7 @@ from module.common.json_layer import json_loads class MediafireComFolder(Crypter): __name__ = "MediafireComFolder" __type__ = "crypter" - __version__ = "0.15" + __version__ = "0.16" __pattern__ = r'http://(?:www\.)?mediafire\.com/(folder/|\?sharekey=|\?\w{13}($|[/#]))' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -26,7 +26,7 @@ class MediafireComFolder(Crypter): def decrypt(self, pyfile): url, result = checkHTMLHeader(pyfile.url) - self.logDebug("Location (%d): %s" % (result, url)) + self.log_debug("Location (%d): %s" % (result, url)) if result == 0: #: load and parse html @@ -40,13 +40,13 @@ class MediafireComFolder(Crypter): m = re.search(self.FOLDER_KEY_PATTERN, html) if m: folder_key = m.group(1) - self.logDebug("FOLDER KEY: %s" % folder_key) + self.log_debug("FOLDER KEY: %s" % folder_key) json_resp = json_loads(self.load("http://www.mediafire.com/api/folder/get_info.php", get={'folder_key' : folder_key, 'response_format': "json", 'version' : 1})) - #self.logInfo(json_resp) + # self.log_info(json_resp) if json_resp['response']['result'] == "Success": for link in json_resp['response']['folder_info']['files']: self.urls.append("http://www.mediafire.com/file/%s" % link['quickkey']) diff --git a/module/plugins/crypter/MegaCoNzFolder.py b/module/plugins/crypter/MegaCoNzFolder.py index a462b7bca..36fbf3cb3 100644 --- a/module/plugins/crypter/MegaCoNzFolder.py +++ b/module/plugins/crypter/MegaCoNzFolder.py @@ -8,7 +8,7 @@ from module.plugins.internal.Crypter import Crypter class MegaCoNzFolder(Crypter): __name__ = "MegaCoNzFolder" __type__ = "crypter" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'(https?://(?:www\.)?mega(\.co)?\.nz/|mega:|chrome:.+?)#F!(?P<ID>[\w^_]+)!(?P<KEY>[\w,\\-]+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), diff --git a/module/plugins/crypter/MegaRapidCzFolder.py b/module/plugins/crypter/MegaRapidCzFolder.py index fadd6dbed..ecb14d7bb 100644 --- a/module/plugins/crypter/MegaRapidCzFolder.py +++ b/module/plugins/crypter/MegaRapidCzFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class MegaRapidCzFolder(SimpleCrypter): __name__ = "MegaRapidCzFolder" __type__ = "crypter" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'http://(?:www\.)?(share|mega)rapid\.cz/slozka/\d+/\w+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), diff --git a/module/plugins/crypter/MegauploadComFolder.py b/module/plugins/crypter/MegauploadComFolder.py index 60e4af57e..5ee4b1f16 100644 --- a/module/plugins/crypter/MegauploadComFolder.py +++ b/module/plugins/crypter/MegauploadComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class MegauploadComFolder(DeadCrypter): __name__ = "MegauploadComFolder" __type__ = "crypter" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'http://(?:www\.)?megaupload\.com/(\?f|xml/folderfiles\.php\?.*&?folderid)=\w+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/Movie2KTo.py b/module/plugins/crypter/Movie2KTo.py index 919d77c86..83146bfbf 100644 --- a/module/plugins/crypter/Movie2KTo.py +++ b/module/plugins/crypter/Movie2KTo.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class Movie2KTo(DeadCrypter): __name__ = "Movie2KTo" __type__ = "crypter" - __version__ = "0.51" + __version__ = "0.52" __pattern__ = r'http://(?:www\.)?movie2k\.to/(.+)\.html' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/MultiUpOrg.py b/module/plugins/crypter/MultiUpOrg.py index b676c3029..0dfa09978 100644 --- a/module/plugins/crypter/MultiUpOrg.py +++ b/module/plugins/crypter/MultiUpOrg.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class MultiUpOrg(SimpleCrypter): __name__ = "MultiUpOrg" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?multiup\.org/(en|fr)/(?P<TYPE>project|download|miror)/\w+(/\w+)?' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -24,7 +24,7 @@ class MultiUpOrg(SimpleCrypter): NAME_PATTERN = r'<title>.*(?:Project|Projet|ownload|élécharger) (?P<N>.+?) (\(|- )' - def getLinks(self): + def get_links(self): m_type = re.match(self.__pattern__, self.pyfile.url).group('TYPE') if m_type == "project": diff --git a/module/plugins/crypter/MultiloadCz.py b/module/plugins/crypter/MultiloadCz.py index 6b1171a54..9ce145984 100644 --- a/module/plugins/crypter/MultiloadCz.py +++ b/module/plugins/crypter/MultiloadCz.py @@ -7,7 +7,7 @@ from module.plugins.internal.Crypter import Crypter class MultiloadCz(Crypter): __name__ = "MultiloadCz" __type__ = "crypter" - __version__ = "0.41" + __version__ = "0.42" __pattern__ = r'http://(?:[^/]*\.)?multiload\.cz/(stahnout|slozka)/.+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -34,9 +34,9 @@ class MultiloadCz(Crypter): else: m = re.findall(self.LINK_PATTERN, self.html) if m: - prefered_set = set(self.getConfig('usedHoster').split('|')) + prefered_set = set(self.get_config('usedHoster').split('|')) self.urls.extend(x[1] for x in m if x[0] in prefered_set) if not self.urls: - ignored_set = set(self.getConfig('ignoredHoster').split('|')) + ignored_set = set(self.get_config('ignoredHoster').split('|')) self.urls.extend(x[1] for x in m if x[0] not in ignored_set) diff --git a/module/plugins/crypter/MultiuploadCom.py b/module/plugins/crypter/MultiuploadCom.py index d0679e118..167baab0f 100644 --- a/module/plugins/crypter/MultiuploadCom.py +++ b/module/plugins/crypter/MultiuploadCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class MultiuploadCom(DeadCrypter): __name__ = "MultiuploadCom" __type__ = "crypter" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'http://(?:www\.)?multiupload\.(com|nl)/\w+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index ec43d7fa9..8abf06602 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -12,7 +12,7 @@ from module.plugins.internal.ReCaptcha import ReCaptcha class NCryptIn(Crypter): __name__ = "NCryptIn" __type__ = "crypter" - __version__ = "1.36" + __version__ = "1.37" __pattern__ = r'http://(?:www\.)?ncrypt\.in/(?P<TYPE>folder|link|frame)-([^/\?]+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -32,7 +32,7 @@ class NCryptIn(Crypter): def setup(self): self.package = None - self.cleanedHtml = None + self.cleaned_html = None self.links_source_order = ["cnl2", "rsdf", "ccf", "dlc", "web"] self.protection_type = None @@ -45,30 +45,30 @@ class NCryptIn(Crypter): folder_name = self.package.folder #: Deal with single links - if self.isSingleLink(): - package_links.extend(self.handleSingleLink()) + if self.is_single_link(): + package_links.extend(self.handle_single_link()) #: Deal with folders else: #: Request folder home - self.html = self.requestFolderHome() - self.cleanedHtml = self.removeHtmlCrap(self.html) - if not self.isOnline(): + self.html = self.request_folder_home() + self.cleaned_html = self.remove_html_crap(self.html) + if not self.is_online(): self.offline() #: Check for folder protection - if self.isProtected(): - self.html = self.unlockProtection() - self.cleanedHtml = self.removeHtmlCrap(self.html) - self.handleErrors() + if self.is_protected(): + self.html = self.unlock_protection() + self.cleaned_html = self.remove_html_crap(self.html) + self.handle_errors() #: Prepare package name and folder - (package_name, folder_name) = self.getPackageInfo() + (package_name, folder_name) = self.get_package_info() #: Extract package links for link_source_type in self.links_source_order: - package_links.extend(self.handleLinkSource(link_source_type)) + package_links.extend(self.handle_link_source(link_source_type)) if package_links: #: use only first source which provides links break package_links = set(package_links) @@ -78,16 +78,16 @@ class NCryptIn(Crypter): self.packages = [(package_name, package_links, folder_name)] - def isSingleLink(self): + def is_single_link(self): link_type = re.match(self.__pattern__, self.pyfile.url).group('TYPE') return link_type in ("link", "frame") - def requestFolderHome(self): + def request_folder_home(self): return self.load(self.pyfile.url) - def removeHtmlCrap(self, content): + def remove_html_crap(self, content): patterns = (r'(type="hidden".*?(name=".*?")?.*?value=".*?")', r'display:none;">(.*?)</(div|span)>', r'<div\s+class="jdownloader"(.*?)</div>', @@ -99,61 +99,61 @@ class NCryptIn(Crypter): return content - def isOnline(self): - if "Your folder does not exist" in self.cleanedHtml: - self.logDebug("File not m") + def is_online(self): + if "Your folder does not exist" in self.cleaned_html: + self.log_debug("File not m") return False return True - def isProtected(self): - form = re.search(r'<form.*?name.*?protected.*?>(.*?)</form>', self.cleanedHtml, re.S) + def is_protected(self): + form = re.search(r'<form.*?name.*?protected.*?>(.*?)</form>', self.cleaned_html, re.S) if form: content = form.group(1) for keyword in ("password", "captcha"): if keyword in content: self.protection_type = keyword - self.logDebug("Links are %s protected" % self.protection_type) + self.log_debug("Links are %s protected" % self.protection_type) return True return False - def getPackageInfo(self): + def get_package_info(self): m = re.search(self.NAME_PATTERN, self.html) if m: name = folder = m.group('N').strip() - self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder)) + self.log_debug("Found name [%s] and folder [%s] in package info" % (name, folder)) else: name = self.package.name folder = self.package.folder - self.logDebug("Package info not m, defaulting to pyfile name [%s] and folder [%s]" % (name, folder)) + self.log_debug("Package info not m, defaulting to pyfile name [%s] and folder [%s]" % (name, folder)) return name, folder - def unlockProtection(self): + def unlock_protection(self): postData = {} - form = re.search(r'<form name="protected"(.*?)</form>', self.cleanedHtml, re.S).group(1) + form = re.search(r'<form name="protected"(.*?)</form>', self.cleaned_html, re.S).group(1) #: Submit package password if "password" in form: - password = self.getPassword() - self.logDebug("Submitting password [%s] for protected links" % password) + password = self.get_password() + self.log_debug("Submitting password [%s] for protected links" % password) postData['password'] = password #: Resolve anicaptcha if "anicaptcha" in form: - self.logDebug("Captcha protected") + self.log_debug("Captcha protected") captchaUri = re.search(r'src="(/temp/anicaptcha/.+?)"', form).group(1) - captcha = self.decryptCaptcha("http://ncrypt.in" + captchaUri) - self.logDebug("Captcha resolved [%s]" % captcha) + captcha = self.decrypt_captcha("http://ncrypt.in" + captchaUri) + self.log_debug("Captcha resolved [%s]" % captcha) postData['captcha'] = captcha #: Resolve recaptcha if "recaptcha" in form: - self.logDebug("ReCaptcha protected") + self.log_debug("ReCaptcha protected") captcha_key = re.search(r'\?k=(.*?)"', form).group(1) - self.logDebug("Resolving ReCaptcha with key [%s]" % captcha_key) + self.log_debug("Resolving ReCaptcha with key [%s]" % captcha_key) recaptcha = ReCaptcha(self) response, challenge = recaptcha.challenge(captcha_key) postData['recaptcha_challenge_field'] = challenge @@ -161,10 +161,10 @@ class NCryptIn(Crypter): #: Resolve circlecaptcha if "circlecaptcha" in form: - self.logDebug("CircleCaptcha protected") + self.log_debug("CircleCaptcha protected") captcha_img_url = "http://ncrypt.in/classes/captcha/circlecaptcha.php" - coords = self.decryptCaptcha(captcha_img_url, forceUser=True, imgtype="png", result_type='positional') - self.logDebug("Captcha resolved, coords [%s]" % str(coords)) + coords = self.decrypt_captcha(captcha_img_url, forceUser=True, imgtype="png", result_type='positional') + self.log_debug("Captcha resolved, coords [%s]" % str(coords)) postData['circle.x'] = coords[0] postData['circle.y'] = coords[1] @@ -173,74 +173,74 @@ class NCryptIn(Crypter): return self.load(self.pyfile.url, post=postData) - def handleErrors(self): + def handle_errors(self): if self.protection_type == "password": - if "This password is invalid!" in self.cleanedHtml: - self.logDebug("Incorrect password, please set right password on 'Edit package' form and retry") + if "This password is invalid!" in self.cleaned_html: + self.log_debug("Incorrect password, please set right password on 'Edit package' form and retry") self.fail(_("Incorrect password, please set right password on 'Edit package' form and retry")) if self.protection_type == "captcha": - if "The securitycheck was wrong!" in self.cleanedHtml: - self.invalidCaptcha() + if "The securitycheck was wrong!" in self.cleaned_html: + self.invalid_captcha() self.retry() else: - self.correctCaptcha() + self.correct_captcha() - def handleLinkSource(self, link_source_type): + def handle_link_source(self, link_source_type): #: Check for JS engine require_js_engine = link_source_type in ("cnl2", "rsdf", "ccf", "dlc") if require_js_engine and not self.js: - self.logDebug("No JS engine available, skip %s links" % link_source_type) + self.log_debug("No JS engine available, skip %s links" % link_source_type) return [] #: Select suitable handler if link_source_type == 'single': - return self.handleSingleLink() + return self.handle_single_link() if link_source_type == 'cnl2': - return self.handleCNL2() + return self.handle_CNL2() elif link_source_type in ("rsdf", "ccf", "dlc"): - return self.handleContainer(link_source_type) + return self.handle_container(link_source_type) elif link_source_type == "web": - return self.handleWebLinks() + return self.handle_web_links() else: self.error(_('Unknown source type "%s"') % link_source_type) - def handleSingleLink(self): - self.logDebug("Handling Single link") + def handle_single_link(self): + self.log_debug("Handling Single link") package_links = [] #: Decrypt single link - decrypted_link = self.decryptLink(self.pyfile.url) + decrypted_link = self.decrypt_link(self.pyfile.url) if decrypted_link: package_links.append(decrypted_link) return package_links - def handleCNL2(self): - self.logDebug("Handling CNL2 links") + def handle_CNL2(self): + self.log_debug("Handling CNL2 links") package_links = [] - if 'cnl2_output' in self.cleanedHtml: + if 'cnl2_output' in self.cleaned_html: try: - (vcrypted, vjk) = self._getCipherParams() + (vcrypted, vjk) = self._get_cipher_params() for (crypted, jk) in zip(vcrypted, vjk): - package_links.extend(self._getLinks(crypted, jk)) + package_links.extend(self._get_links(crypted, jk)) except Exception: self.fail(_("Unable to decrypt CNL2 links")) return package_links - def handleContainers(self): - self.logDebug("Handling Container links") + def handle_containers(self): + self.log_debug("Handling Container links") package_links = [] pattern = r'/container/(rsdf|dlc|ccf)/(\w+)' containersLinks = re.findall(pattern, self.html) - self.logDebug("Decrypting %d Container links" % len(containersLinks)) + self.log_debug("Decrypting %d Container links" % len(containersLinks)) for containerLink in containersLinks: link = "http://ncrypt.in/container/%s/%s.%s" % (containerLink[0], containerLink[1], containerLink[0]) package_links.append(link) @@ -248,15 +248,15 @@ class NCryptIn(Crypter): return package_links - def handleWebLinks(self): - self.logDebug("Handling Web links") + def handle_web_links(self): + self.log_debug("Handling Web links") pattern = r'(http://ncrypt\.in/link-.*?=)' links = re.findall(pattern, self.html) package_links = [] - self.logDebug("Decrypting %d Web links" % len(links)) + self.log_debug("Decrypting %d Web links" % len(links)) for i, link in enumerate(links): - self.logDebug("Decrypting Web link %d, %s" % (i + 1, link)) + self.log_debug("Decrypting Web link %d, %s" % (i + 1, link)) decrypted_link = self.decrypt(link) if decrypted_link: package_links.append(decrypted_link) @@ -264,16 +264,16 @@ class NCryptIn(Crypter): return package_links - def decryptLink(self, link): + def decrypt_link(self, link): try: url = link.replace("link-", "frame-") link = self.load(url, just_header=True)['location'] return link except Exception, detail: - self.logDebug("Error decrypting link %s, %s" % (link, detail)) + self.log_debug("Error decrypting link %s, %s" % (link, detail)) - def _getCipherParams(self): + def _get_cipher_params(self): pattern = r'<input.*?name="%s".*?value="(.*?)"' #: Get jk @@ -285,14 +285,14 @@ class NCryptIn(Crypter): vcrypted = re.findall(crypted_re, self.html) #: Log and return - self.logDebug("Detected %d crypted blocks" % len(vcrypted)) + self.log_debug("Detected %d crypted blocks" % len(vcrypted)) return vcrypted, vjk - def _getLinks(self, crypted, jk): + def _get_links(self, crypted, jk): #: Get key jreturn = self.js.eval("%s f()" % jk) - self.logDebug("JsEngine returns value [%s]" % jreturn) + self.log_debug("JsEngine returns value [%s]" % jreturn) key = binascii.unhexlify(jreturn) #: Decrypt @@ -306,5 +306,5 @@ class NCryptIn(Crypter): links = filter(bool, text.split('\n')) #: Log and return - self.logDebug("Block has %d links" % len(links)) + self.log_debug("Block has %d links" % len(links)) return links diff --git a/module/plugins/crypter/NetfolderIn.py b/module/plugins/crypter/NetfolderIn.py index 32d59af03..465c0a302 100644 --- a/module/plugins/crypter/NetfolderIn.py +++ b/module/plugins/crypter/NetfolderIn.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class NetfolderIn(DeadCrypter): __name__ = "NetfolderIn" __type__ = "crypter" - __version__ = "0.73" + __version__ = "0.74" __pattern__ = r'http://(?:www\.)?netfolder\.(in|me)/(folder\.php\?folder_id=)?(?P<ID>\w+)(?(1)|/\w+)' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/NitroflareComFolder.py b/module/plugins/crypter/NitroflareComFolder.py index 1db2378e3..0e1f92e98 100644 --- a/module/plugins/crypter/NitroflareComFolder.py +++ b/module/plugins/crypter/NitroflareComFolder.py @@ -7,7 +7,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class NitroflareComFolder(SimpleCrypter): __name__ = "NitroflareComFolder" __type__ = "crypter" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?nitroflare\.com/folder/(?P<USER>\d+)/(?P<ID>[\w=]+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -18,7 +18,7 @@ class NitroflareComFolder(SimpleCrypter): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - def getLinks(self): + def get_links(self): res = json_loads(self.load("http://nitroflare.com/ajax/folder.php", post={'userId' : self.info['pattern']['USER'], 'folder' : self.info['pattern']['ID'], diff --git a/module/plugins/crypter/NosvideoCom.py b/module/plugins/crypter/NosvideoCom.py index 9808837c4..b08b1cbdc 100644 --- a/module/plugins/crypter/NosvideoCom.py +++ b/module/plugins/crypter/NosvideoCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class NosvideoCom(SimpleCrypter): __name__ = "NosvideoCom" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?nosvideo\.com/\?v=\w+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), diff --git a/module/plugins/crypter/OneKhDe.py b/module/plugins/crypter/OneKhDe.py index a45d7dbff..ef95ab68c 100644 --- a/module/plugins/crypter/OneKhDe.py +++ b/module/plugins/crypter/OneKhDe.py @@ -9,7 +9,7 @@ from module.utils import html_unescape class OneKhDe(Crypter): __name__ = "OneKhDe" __type__ = "crypter" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'http://(?:www\.)?1kh\.de/f/' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), diff --git a/module/plugins/crypter/OronComFolder.py b/module/plugins/crypter/OronComFolder.py index 048af7d82..da93e6f97 100644 --- a/module/plugins/crypter/OronComFolder.py +++ b/module/plugins/crypter/OronComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class OronComFolder(DeadCrypter): __name__ = "OronComFolder" __type__ = "crypter" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'http://(?:www\.)?oron\.com/folder/\w+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/PastebinCom.py b/module/plugins/crypter/PastebinCom.py index af039a6ab..6186bc894 100644 --- a/module/plugins/crypter/PastebinCom.py +++ b/module/plugins/crypter/PastebinCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class PastebinCom(SimpleCrypter): __name__ = "PastebinCom" __type__ = "crypter" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'https://(?:www\.)?pastebin\.com/(.+i=)?(?P<ID>\w{8})' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), diff --git a/module/plugins/crypter/PastedCo.py b/module/plugins/crypter/PastedCo.py index 8236345cc..50bcadaba 100644 --- a/module/plugins/crypter/PastedCo.py +++ b/module/plugins/crypter/PastedCo.py @@ -8,7 +8,7 @@ import re class PastedCo(Crypter): __name__ = "PastedCo" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'http://pasted\.co/\w+' diff --git a/module/plugins/crypter/QuickshareCzFolder.py b/module/plugins/crypter/QuickshareCzFolder.py index e1fdc22bc..01b932e06 100644 --- a/module/plugins/crypter/QuickshareCzFolder.py +++ b/module/plugins/crypter/QuickshareCzFolder.py @@ -7,7 +7,7 @@ from module.plugins.internal.Crypter import Crypter class QuickshareCzFolder(Crypter): __name__ = "QuickshareCzFolder" __type__ = "crypter" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'http://(?:www\.)?quickshare\.cz/slozka-\d+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), diff --git a/module/plugins/crypter/RSLayerCom.py b/module/plugins/crypter/RSLayerCom.py index 6f078e9e4..1b1c5b139 100644 --- a/module/plugins/crypter/RSLayerCom.py +++ b/module/plugins/crypter/RSLayerCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class RSLayerCom(DeadCrypter): __name__ = "RSLayerCom" __type__ = "crypter" - __version__ = "0.21" + __version__ = "0.22" __pattern__ = r'http://(?:www\.)?rs-layer\.com/directory-' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index cda70816d..4f3077771 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -14,7 +14,7 @@ from module.utils import save_join as fs_join class RelinkUs(Crypter): __name__ = "RelinkUs" __type__ = "crypter" - __version__ = "3.13" + __version__ = "3.14" __pattern__ = r'http://(?:www\.)?relink\.us/(f/|((view|go)\.php\?id=))(?P<ID>.+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -63,32 +63,32 @@ class RelinkUs(Crypter): def decrypt(self, pyfile): #: Init - self.initPackage(pyfile) + self.init_package(pyfile) #: Request package - self.requestPackage() + self.request_package() #: Check for online - if not self.isOnline(): + if not self.is_online(): self.offline() #: Check for protection - if self.isPasswordProtected(): - self.unlockPasswordProtection() - self.handleErrors() + if self.is_password_protected(): + self.unlock_password_protection() + self.handle_errors() - if self.isCaptchaProtected(): + if self.is_captcha_protected(): self.captcha = True - self.unlockCaptchaProtection() - self.handleErrors() + self.unlock_captcha_protection() + self.handle_errors() #: Get package name and folder - (package_name, folder_name) = self.getPackageInfo() + (package_name, folder_name) = self.get_package_info() #: Extract package links package_links = [] for sources in self.PREFERRED_LINK_SOURCES: - package_links.extend(self.handleLinkSource(sources)) + package_links.extend(self.handle_link_source(sources)) if package_links: #: use only first source which provides links break package_links = set(package_links) @@ -98,39 +98,39 @@ class RelinkUs(Crypter): self.packages = [(package_name, package_links, folder_name)] - def initPackage(self, pyfile): + def init_package(self, pyfile): self.fileid = re.match(self.__pattern__, pyfile.url).group('ID') self.package = pyfile.package() - def requestPackage(self): + def request_package(self): self.html = self.load(self.pyfile.url) - def isOnline(self): + def is_online(self): if self.OFFLINE_TOKEN in self.html: - self.logDebug("File not found") + self.log_debug("File not found") return False return True - def isPasswordProtected(self): + def is_password_protected(self): if self.PASSWORD_TOKEN in self.html: - self.logDebug("Links are password protected") + self.log_debug("Links are password protected") return True - def isCaptchaProtected(self): + def is_captcha_protected(self): if self.CAPTCHA_TOKEN in self.html: - self.logDebug("Links are captcha protected") + self.log_debug("Links are captcha protected") return True return False - def unlockPasswordProtection(self): - password = self.getPassword() + def unlock_password_protection(self): + password = self.get_password() - self.logDebug("Submitting password [%s] for protected links" % password) + self.log_debug("Submitting password [%s] for protected links" % password) if password: passwd_url = self.PASSWORD_SUBMIT_URL + "?id=%s" % self.fileid @@ -138,17 +138,17 @@ class RelinkUs(Crypter): self.html = self.load(passwd_url, post=passwd_data) - def unlockCaptchaProtection(self): - self.logDebug("Request user positional captcha resolving") + def unlock_captcha_protection(self): + self.log_debug("Request user positional captcha resolving") captcha_img_url = self.CAPTCHA_IMG_URL + "?id=%s" % self.fileid - coords = self.decryptCaptcha(captcha_img_url, forceUser=True, imgtype="png", result_type='positional') - self.logDebug("Captcha resolved, coords [%s]" % str(coords)) + coords = self.decrypt_captcha(captcha_img_url, forceUser=True, imgtype="png", result_type='positional') + self.log_debug("Captcha resolved, coords [%s]" % str(coords)) captcha_post_url = self.CAPTCHA_SUBMIT_URL + "?id=%s" % self.fileid captcha_post_data = {'button.x': coords[0], 'button.y': coords[1], 'captcha': 'submit'} self.html = self.load(captcha_post_url, post=captcha_post_data) - def getPackageInfo(self): + def get_package_info(self): name = folder = None #: Try to get info from web @@ -157,65 +157,65 @@ class RelinkUs(Crypter): title = m.group(1).strip() if not self.FILE_NOTITLE in title: name = folder = title - self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder)) + self.log_debug("Found name [%s] and folder [%s] in package info" % (name, folder)) #: Fallback to defaults if not name or not folder: name = self.package.name folder = self.package.folder - self.logDebug("Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (name, folder)) + self.log_debug("Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (name, folder)) #: Return package info return name, folder - def handleErrors(self): + def handle_errors(self): if self.PASSWORD_ERROR_ROKEN in self.html: msg = "Incorrect password, please set right password on 'Edit package' form and retry" - self.logDebug(msg) + self.log_debug(msg) self.fail(_(msg)) if self.captcha: if self.CAPTCHA_ERROR_ROKEN in self.html: - self.invalidCaptcha() + self.invalid_captcha() self.retry() else: - self.correctCaptcha() + self.correct_captcha() - def handleLinkSource(self, source): + def handle_link_source(self, source): if source == 'cnl2': - return self.handleCNL2Links() + return self.handle_CNL2Links() elif source == 'dlc': - return self.handleDLCLinks() + return self.handle_d_l_c_links() elif source == 'web': - return self.handleWEBLinks() + return self.handle_w_e_b_links() else: self.error(_('Unknown source type "%s"') % source) - def handleCNL2Links(self): - self.logDebug("Search for CNL2 links") + def handle_CNL2Links(self): + self.log_debug("Search for CNL2 links") package_links = [] m = re.search(self.CNL2_FORM_REGEX, self.html, re.S) if m: cnl2_form = m.group(1) try: - (vcrypted, vjk) = self._getCipherParams(cnl2_form) + (vcrypted, vjk) = self._get_cipher_params(cnl2_form) for (crypted, jk) in zip(vcrypted, vjk): - package_links.extend(self._getLinks(crypted, jk)) + package_links.extend(self._get_links(crypted, jk)) except Exception: - self.logDebug("Unable to decrypt CNL2 links") + self.log_debug("Unable to decrypt CNL2 links") return package_links - def handleDLCLinks(self): - self.logDebug("Search for DLC links") + def handle_d_l_c_links(self): + self.log_debug("Search for DLC links") package_links = [] m = re.search(self.DLC_LINK_REGEX, self.html) if m: container_url = self.DLC_DOWNLOAD_URL + "?id=%s&dlc=1" % self.fileid - self.logDebug("Downloading DLC container link [%s]" % container_url) + self.log_debug("Downloading DLC container link [%s]" % container_url) try: dlc = self.load(container_url) dlc_filename = self.fileid + ".dlc" @@ -230,19 +230,19 @@ class RelinkUs(Crypter): return package_links - def handleWEBLinks(self): - self.logDebug("Search for WEB links") + def handle_w_e_b_links(self): + self.log_debug("Search for WEB links") package_links = [] params = re.findall(self.WEB_FORWARD_REGEX, self.html) - self.logDebug("Decrypting %d Web links" % len(params)) + self.log_debug("Decrypting %d Web links" % len(params)) for index, param in enumerate(params): try: url = self.WEB_FORWARD_URL + "?%s" % param - self.logDebug("Decrypting Web link %d, %s" % (index + 1, url)) + self.log_debug("Decrypting Web link %d, %s" % (index + 1, url)) res = self.load(url) link = re.search(self.WEB_LINK_REGEX, res).group(1) @@ -250,15 +250,15 @@ class RelinkUs(Crypter): package_links.append(link) except Exception, detail: - self.logDebug("Error decrypting Web link %s, %s" % (index, detail)) + self.log_debug("Error decrypting Web link %s, %s" % (index, detail)) - self.setWait(4) + self.set_wait(4) self.wait() return package_links - def _getCipherParams(self, cnl2_form): + def _get_cipher_params(self, cnl2_form): #: Get jk jk_re = self.CNL2_FORMINPUT_REGEX % self.CNL2_JK_KEY vjk = re.findall(jk_re, cnl2_form, re.I) @@ -268,14 +268,14 @@ class RelinkUs(Crypter): vcrypted = re.findall(crypted_re, cnl2_form, re.I) #: Log and return - self.logDebug("Detected %d crypted blocks" % len(vcrypted)) + self.log_debug("Detected %d crypted blocks" % len(vcrypted)) return vcrypted, vjk - def _getLinks(self, crypted, jk): + def _get_links(self, crypted, jk): #: Get key jreturn = self.js.eval("%s f()" % jk) - self.logDebug("JsEngine returns value [%s]" % jreturn) + self.log_debug("JsEngine returns value [%s]" % jreturn) key = binascii.unhexlify(jreturn) #: Decrypt @@ -289,5 +289,5 @@ class RelinkUs(Crypter): links = filter(bool, text.split('\n')) #: Log and return - self.logDebug("Package has %d links" % len(links)) + self.log_debug("Package has %d links" % len(links)) return links diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py index 3ebb5f22d..973d62985 100644 --- a/module/plugins/crypter/SafelinkingNet.py +++ b/module/plugins/crypter/SafelinkingNet.py @@ -12,7 +12,7 @@ from module.plugins.internal.SolveMedia import SolveMedia class SafelinkingNet(Crypter): __name__ = "SafelinkingNet" __type__ = "crypter" - __version__ = "0.16" + __version__ = "0.17" __pattern__ = r'https?://(?:www\.)?safelinking\.net/([pd])/\w+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -43,7 +43,7 @@ class SafelinkingNet(Crypter): self.html = self.load(url) if "link-password" in self.html: - postData['link-password'] = self.getPassword() + postData['link-password'] = self.get_password() if "altcaptcha" in self.html: for _i in xrange(5): diff --git a/module/plugins/crypter/SecuredIn.py b/module/plugins/crypter/SecuredIn.py index a2eac4f13..321cc8778 100644 --- a/module/plugins/crypter/SecuredIn.py +++ b/module/plugins/crypter/SecuredIn.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class SecuredIn(DeadCrypter): __name__ = "SecuredIn" __type__ = "crypter" - __version__ = "0.21" + __version__ = "0.22" __pattern__ = r'http://(?:www\.)?secured\.in/download-[\d]+-\w{8}\.html' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index cce2177f4..db827ca27 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.Crypter import Crypter class SexuriaCom(Crypter): __name__ = "SexuriaCom" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?sexuria\.com/(v1/)?(Pornos_Kostenlos_.+?_(\d+)\.html|dl_links_\d+_\d+\.html|id=\d+\&part=\d+\&link=\d+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -34,11 +34,11 @@ class SexuriaCom(Crypter): self.package = pyfile.package() #: Get package links - package_name, self.links, folder_name, package_pwd = self.decryptLinks(self.pyfile.url) + package_name, self.links, folder_name, package_pwd = self.decrypt_links(self.pyfile.url) self.packages = [(package_name, self.links, folder_name)] - def decryptLinks(self, url): + def decrypt_links(self, url): linklist = [] name = self.package.name folder = self.package.folder @@ -65,30 +65,30 @@ class SexuriaCom(Crypter): title = re.search(self.PATTERN_TITLE, html, re.I).group('TITLE').strip() if title: name = folder = title - self.logDebug("Package info found, name [%s] and folder [%s]" % (name, folder)) + self.log_debug("Package info found, name [%s] and folder [%s]" % (name, folder)) pwd = re.search(self.PATTERN_PASSWORD, html, re.I | re.S).group('PWD') if pwd and pwd not in ("Kein Passwort", "-"): password = pwd.strip() - self.logDebug("Password info [%s] found" % password) + self.log_debug("Password info [%s] found" % password) #: Process link (dl_link) html = self.load(url) links = re.findall(self.PATTERN_REDIRECT_LINKS, html, re.I) if len(links) == 0: - self.logError("Broken for link %s" % link) + self.log_error("Broken for link %s" % link) else: for link in links: link = link.replace("http://sexuria.com/", "http://www.sexuria.com/") finallink = self.load(link, just_header=True)['location'] if not finallink or "sexuria.com/" in finallink: - self.logError("Broken for link %s" % link) + self.log_error("Broken for link %s" % link) else: linklist.append(finallink) #: Debug log - self.logDebug("%d supported links" % len(linklist)) + self.log_debug("%d supported links" % len(linklist)) for i, link in enumerate(linklist): - self.logDebug("Supported link %d, %s" % (i + 1, link)) + self.log_debug("Supported link %d, %s" % (i + 1, link)) return name, linklist, folder, password diff --git a/module/plugins/crypter/ShSt.py b/module/plugins/crypter/ShSt.py index 4dc5b1e2d..a65522aea 100644 --- a/module/plugins/crypter/ShSt.py +++ b/module/plugins/crypter/ShSt.py @@ -9,7 +9,7 @@ import re class ShSt(Crypter): __name__ = "ShSt" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://sh\.st/\w+' diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 250cc0c81..9b435e694 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -10,7 +10,7 @@ from module.plugins.internal.Crypter import Crypter class ShareLinksBiz(Crypter): __name__ = "ShareLinksBiz" __type__ = "crypter" - __version__ = "1.15" + __version__ = "1.16" __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P<ID>_?\w+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -22,113 +22,113 @@ class ShareLinksBiz(Crypter): def setup(self): - self.baseUrl = None - self.fileId = None + self.base_url = None + self.file_id = None self.package = None self.captcha = False def decrypt(self, pyfile): #: Init - self.initFile(pyfile) + self.init_file(pyfile) #: Request package - url = self.baseUrl + '/' + self.fileId + url = self.base_url + '/' + self.file_id self.html = self.load(url) #: Unblock server (load all images) - self.unblockServer() + self.unblock_server() #: Check for protection - if self.isPasswordProtected(): - self.unlockPasswordProtection() - self.handleErrors() + if self.is_password_protected(): + self.unlock_password_protection() + self.handle_errors() - if self.isCaptchaProtected(): + if self.is_captcha_protected(): self.captcha = True - self.unlockCaptchaProtection() - self.handleErrors() + self.unlock_captcha_protection() + self.handle_errors() #: Extract package links package_links = [] - package_links.extend(self.handleWebLinks()) - package_links.extend(self.handleContainers()) - package_links.extend(self.handleCNL2()) + package_links.extend(self.handle_web_links()) + package_links.extend(self.handle_containers()) + package_links.extend(self.handle_CNL2()) package_links = set(package_links) #: Get package info - package_name, package_folder = self.getPackageInfo() + package_name, package_folder = self.get_package_info() #: Pack self.packages = [(package_name, package_links, package_folder)] - def initFile(self, pyfile): + def init_file(self, pyfile): url = pyfile.url if 's2l.biz' in url: url = self.load(url, just_header=True)['location'] - self.baseUrl = "http://www.%s.biz" % re.match(self.__pattern__, url).group(1) - self.fileId = re.match(self.__pattern__, url).group('ID') + self.base_url = "http://www.%s.biz" % re.match(self.__pattern__, url).group(1) + self.file_id = re.match(self.__pattern__, url).group('ID') self.package = pyfile.package() - def isOnline(self): + def is_online(self): if "No usable content was found" in self.html: - self.logDebug("File not found") + self.log_debug("File not found") return False return True - def isPasswordProtected(self): + def is_password_protected(self): if re.search(r'''<form.*?id="passwordForm".*?>''', self.html): - self.logDebug("Links are protected") + self.log_debug("Links are protected") return True return False - def isCaptchaProtected(self): + def is_captcha_protected(self): if '<map id="captchamap"' in self.html: - self.logDebug("Links are captcha protected") + self.log_debug("Links are captcha protected") return True return False - def unblockServer(self): + def unblock_server(self): imgs = re.findall(r"(/template/images/.*?\.gif)", self.html) for img in imgs: - self.load(self.baseUrl + img) + self.load(self.base_url + img) - def unlockPasswordProtection(self): - password = self.getPassword() - self.logDebug("Submitting password [%s] for protected links" % password) + def unlock_password_protection(self): + password = self.get_password() + self.log_debug("Submitting password [%s] for protected links" % password) post = {"password": password, 'login': 'Submit form'} - url = self.baseUrl + '/' + self.fileId + url = self.base_url + '/' + self.file_id self.html = self.load(url, post=post) - def unlockCaptchaProtection(self): + def unlock_captcha_protection(self): #: Get captcha map - captchaMap = self._getCaptchaMap() - self.logDebug("Captcha map with [%d] positions" % len(captchaMap.keys())) + captchaMap = self._get_captcha_map() + self.log_debug("Captcha map with [%d] positions" % len(captchaMap.keys())) #: Request user for captcha coords m = re.search(r'<img src="/captcha.gif\?d=(.*?)&PHPSESSID=(.*?)&legend=1"', self.html) - captchaUrl = self.baseUrl + '/captcha.gif?d=%s&PHPSESSID=%s' % (m.group(1), m.group(2)) - self.logDebug("Waiting user for correct position") - coords = self.decryptCaptcha(captchaUrl, forceUser=True, imgtype="gif", result_type='positional') - self.logDebug("Captcha resolved, coords [%s]" % str(coords)) + captchaUrl = self.base_url + '/captcha.gif?d=%s&PHPSESSID=%s' % (m.group(1), m.group(2)) + self.log_debug("Waiting user for correct position") + coords = self.decrypt_captcha(captchaUrl, forceUser=True, imgtype="gif", result_type='positional') + self.log_debug("Captcha resolved, coords [%s]" % str(coords)) #: Resolve captcha - href = self._resolveCoords(coords, captchaMap) + href = self._resolve_coords(coords, captchaMap) if href is None: - self.invalidCaptcha() + self.invalid_captcha() self.retry(wait_time=5) - url = self.baseUrl + href + url = self.base_url + href self.html = self.load(url) - def _getCaptchaMap(self): + def _get_captcha_map(self): mapp = {} for m in re.finditer(r'<area shape="rect" coords="(.*?)" href="(.*?)"', self.html): rect = eval('(' + m.group(1) + ')') @@ -137,7 +137,7 @@ class ShareLinksBiz(Crypter): return mapp - def _resolveCoords(self, coords, captchaMap): + def _resolve_coords(self, coords, captchaMap): x, y = coords for rect, href in captchaMap.iteritems(): x1, y1, x2, y2 = rect @@ -145,20 +145,20 @@ class ShareLinksBiz(Crypter): return href - def handleErrors(self): + def handle_errors(self): if "The inserted password was wrong" in self.html: - self.logDebug("Incorrect password, please set right password on 'Edit package' form and retry") + self.log_debug("Incorrect password, please set right password on 'Edit package' form and retry") self.fail(_("Incorrect password, please set right password on 'Edit package' form and retry")) if self.captcha: if "Your choice was wrong" in self.html: - self.invalidCaptcha() + self.invalid_captcha() self.retry(wait_time=5) else: - self.correctCaptcha() + self.correct_captcha() - def getPackageInfo(self): + def get_package_info(self): name = folder = None #: Extract from web package header @@ -168,35 +168,35 @@ class ShareLinksBiz(Crypter): title = m.group(1).strip() if 'unnamed' not in title: name = folder = title - self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder)) + self.log_debug("Found name [%s] and folder [%s] in package info" % (name, folder)) #: Fallback to defaults if not name or not folder: name = self.package.name folder = self.package.folder - self.logDebug("Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (name, folder)) + self.log_debug("Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (name, folder)) #: Return package info return name, folder - def handleWebLinks(self): + def handle_web_links(self): package_links = [] - self.logDebug("Handling Web links") + self.log_debug("Handling Web links") #@TODO: Gather paginated web links pattern = r'javascript:_get\(\'(.*?)\', \d+, \'\'\)' ids = re.findall(pattern, self.html) - self.logDebug("Decrypting %d Web links" % len(ids)) + self.log_debug("Decrypting %d Web links" % len(ids)) for i, ID in enumerate(ids): try: - self.logDebug("Decrypting Web link %d, [%s]" % (i + 1, ID)) + self.log_debug("Decrypting Web link %d, [%s]" % (i + 1, ID)) - dwLink = self.baseUrl + "/get/lnk/" + ID + dwLink = self.base_url + "/get/lnk/" + ID res = self.load(dwLink) code = re.search(r'frm/(\d+)', res).group(1) - fwLink = self.baseUrl + "/get/frm/" + code + fwLink = self.base_url + "/get/frm/" + code res = self.load(fwLink) jscode = re.search(r'<script language="javascript">\s*eval\((.*)\)\s*</script>', res, re.S).group(1) @@ -205,44 +205,44 @@ class ShareLinksBiz(Crypter): dlLink = self.js.eval(jslauncher % jscode) - self.logDebug("JsEngine returns value [%s] for redirection link" % dlLink) + self.log_debug("JsEngine returns value [%s] for redirection link" % dlLink) package_links.append(dlLink) except Exception, detail: - self.logDebug("Error decrypting Web link [%s], %s" % (ID, detail)) + self.log_debug("Error decrypting Web link [%s], %s" % (ID, detail)) return package_links - def handleContainers(self): + def handle_containers(self): package_links = [] - self.logDebug("Handling Container links") + self.log_debug("Handling Container links") pattern = r'javascript:_get\(\'(.*?)\', 0, \'(rsdf|ccf|dlc)\'\)' containersLinks = re.findall(pattern, self.html) - self.logDebug("Decrypting %d Container links" % len(containersLinks)) + self.log_debug("Decrypting %d Container links" % len(containersLinks)) for containerLink in containersLinks: - link = "%s/get/%s/%s" % (self.baseUrl, containerLink[1], containerLink[0]) + link = "%s/get/%s/%s" % (self.base_url, containerLink[1], containerLink[0]) package_links.append(link) return package_links - def handleCNL2(self): + def handle_CNL2(self): package_links = [] - self.logDebug("Handling CNL2 links") + self.log_debug("Handling CNL2 links") if '/lib/cnl2/ClicknLoad.swf' in self.html: try: - (crypted, jk) = self._getCipherParams() - package_links.extend(self._getLinks(crypted, jk)) + (crypted, jk) = self._get_cipher_params() + package_links.extend(self._get_links(crypted, jk)) except Exception: self.fail(_("Unable to decrypt CNL2 links")) return package_links - def _getCipherParams(self): + def _get_cipher_params(self): #: Request CNL2 code = re.search(r'ClicknLoad.swf\?code=(.*?)"', self.html).group(1) - url = "%s/get/cnl2/%s" % (self.baseUrl, code) + url = "%s/get/cnl2/%s" % (self.base_url, code) res = self.load(url) params = res.split(";;") @@ -258,10 +258,10 @@ class ShareLinksBiz(Crypter): return crypted, jk - def _getLinks(self, crypted, jk): + def _get_links(self, crypted, jk): #: Get key jreturn = self.js.eval("%s f()" % jk) - self.logDebug("JsEngine returns value [%s]" % jreturn) + self.log_debug("JsEngine returns value [%s]" % jreturn) key = binascii.unhexlify(jreturn) #: Decrypt @@ -275,5 +275,5 @@ class ShareLinksBiz(Crypter): links = filter(bool, text.split('\n')) #: Log and return - self.logDebug("Block has %d links" % len(links)) + self.log_debug("Block has %d links" % len(links)) return links diff --git a/module/plugins/crypter/SharingmatrixComFolder.py b/module/plugins/crypter/SharingmatrixComFolder.py index eb1b4d8a6..399e5c386 100644 --- a/module/plugins/crypter/SharingmatrixComFolder.py +++ b/module/plugins/crypter/SharingmatrixComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class SharingmatrixComFolder(DeadCrypter): __name__ = "SharingmatrixComFolder" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'http://(?:www\.)?sharingmatrix\.com/folder/\w+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/SpeedLoadOrgFolder.py b/module/plugins/crypter/SpeedLoadOrgFolder.py index af768ef7b..14e988a57 100644 --- a/module/plugins/crypter/SpeedLoadOrgFolder.py +++ b/module/plugins/crypter/SpeedLoadOrgFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class SpeedLoadOrgFolder(DeadCrypter): __name__ = "SpeedLoadOrgFolder" __type__ = "crypter" - __version__ = "0.30" + __version__ = "0.31" __pattern__ = r'http://(?:www\.)?speedload\.org/(\d+~f$|folder/\d+/)' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/StealthTo.py b/module/plugins/crypter/StealthTo.py index 551468980..c715af7b7 100644 --- a/module/plugins/crypter/StealthTo.py +++ b/module/plugins/crypter/StealthTo.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class StealthTo(DeadCrypter): __name__ = "StealthTo" __type__ = "crypter" - __version__ = "0.20" + __version__ = "0.21" __pattern__ = r'http://(?:www\.)?stealth\.to/folder/.+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/TNTVillageScambioeticoOrg.py b/module/plugins/crypter/TNTVillageScambioeticoOrg.py index 5606b8a7f..f812e0edc 100644 --- a/module/plugins/crypter/TNTVillageScambioeticoOrg.py +++ b/module/plugins/crypter/TNTVillageScambioeticoOrg.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class TNTVillageScambioeticoOrg(SimpleCrypter): __name__ = "TNTVillageScambioeticoOrg" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'http://(?:www\.)?forum\.tntvillage\.scambioetico\.org/index\.php\?.*showtopic=\d+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), #: Overrides core.config['general']['folder_per_package'] @@ -20,7 +20,7 @@ class TNTVillageScambioeticoOrg(SimpleCrypter): LINK_PATTERNS = [r'<th class="titlemedium"><a href=\'(.+?)\'', r"<a href='(\./index\.php\?act.+?)'"] - def getLinks(self): + def get_links(self): for p in self.LINK_PATTERNS: self.LINK_PATTERN = p links = super(TNTVillageScambioeticoOrg, self).getLinks() diff --git a/module/plugins/crypter/TinyurlCom.py b/module/plugins/crypter/TinyurlCom.py index e2cf50358..5a8e0607e 100644 --- a/module/plugins/crypter/TinyurlCom.py +++ b/module/plugins/crypter/TinyurlCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class TinyurlCom(SimpleCrypter): __name__ = "TinyurlCom" __type__ = "crypter" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?(preview\.)?tinyurl\.com/[\w-]+' diff --git a/module/plugins/crypter/TnyCz.py b/module/plugins/crypter/TnyCz.py index 56c737969..4ba774af7 100644 --- a/module/plugins/crypter/TnyCz.py +++ b/module/plugins/crypter/TnyCz.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class TnyCz(SimpleCrypter): __name__ = "TnyCz" __type__ = "crypter" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?tny\.cz/\w+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -23,7 +23,7 @@ class TnyCz(SimpleCrypter): NAME_PATTERN = r'<title>(?P<N>.+?) - .+</title>' - def getLinks(self): + def get_links(self): m = re.search(r'<a id=\'save_paste\' href="(.+save\.php\?hash=.+)">', self.html) return re.findall(".+", self.load(m.group(1))) if m else None diff --git a/module/plugins/crypter/TrailerzoneInfo.py b/module/plugins/crypter/TrailerzoneInfo.py index 6f1c90612..cc4e31c0c 100644 --- a/module/plugins/crypter/TrailerzoneInfo.py +++ b/module/plugins/crypter/TrailerzoneInfo.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class TrailerzoneInfo(DeadCrypter): __name__ = "TrailerzoneInfo" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?trailerzone\.info/.+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/TurbobitNetFolder.py b/module/plugins/crypter/TurbobitNetFolder.py index 2ffcfae13..f8e56712f 100644 --- a/module/plugins/crypter/TurbobitNetFolder.py +++ b/module/plugins/crypter/TurbobitNetFolder.py @@ -9,7 +9,7 @@ from module.common.json_layer import json_loads class TurbobitNetFolder(SimpleCrypter): __name__ = "TurbobitNetFolder" __type__ = "crypter" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?turbobit\.net/download/folder/(?P<ID>\w+)' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -25,7 +25,7 @@ class TurbobitNetFolder(SimpleCrypter): NAME_PATTERN = r'src=\'/js/lib/grid/icon/folder.png\'> <span>(?P<N>.+?)</span>' - def _getLinks(self, id, page=1): + def _get_links(self, id, page=1): gridFile = self.load("http://turbobit.net/downloadfolder/gridFile", get={"rootId": id, "rows": 200, "page": page}) grid = json_loads(gridFile) @@ -33,16 +33,16 @@ class TurbobitNetFolder(SimpleCrypter): if grid['rows']: for i in grid['rows']: yield i['id'] - for id in self._getLinks(id, page + 1): + for id in self._get_links(id, page + 1): yield id else: return - def getLinks(self): + def get_links(self): id = re.match(self.__pattern__, self.pyfile.url).group('ID') fixurl = lambda id: "http://turbobit.net/%s.html" % id - return map(fixurl, self._getLinks(id)) + return map(fixurl, self._get_links(id)) getInfo = create_getInfo(TurbobitNetFolder) diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index b8840132f..a5871e1f4 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -10,7 +10,7 @@ from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo class TusfilesNetFolder(XFSCrypter): __name__ = "TusfilesNetFolder" __type__ = "crypter" - __version__ = "0.08" + __version__ = "0.09" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P<ID>\w+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), @@ -27,11 +27,11 @@ class TusfilesNetFolder(XFSCrypter): URL_REPLACEMENTS = [(__pattern__ + ".*", r'https://www.tusfiles.net/go/\g<ID>/')] - def loadPage(self, page_n): + def load_page(self, page_n): return self.load(urlparse.urljoin(self.pyfile.url, str(page_n))) - def handlePages(self, pyfile): + def handle_pages(self, pyfile): pages = re.search(self.PAGES_PATTERN, self.html) if pages: pages = int(math.ceil(int(pages.group('pages')) / 25.0)) @@ -39,8 +39,8 @@ class TusfilesNetFolder(XFSCrypter): return for p in xrange(2, pages + 1): - self.html = self.loadPage(p) - self.links += self.getLinks() + self.html = self.load_page(p) + self.links += self.get_links() getInfo = create_getInfo(TusfilesNetFolder) diff --git a/module/plugins/crypter/UlozToFolder.py b/module/plugins/crypter/UlozToFolder.py index 6e2c15c87..52789c00c 100644 --- a/module/plugins/crypter/UlozToFolder.py +++ b/module/plugins/crypter/UlozToFolder.py @@ -7,7 +7,7 @@ from module.plugins.internal.Crypter import Crypter class UlozToFolder(Crypter): __name__ = "UlozToFolder" __type__ = "crypter" - __version__ = "0.21" + __version__ = "0.22" __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), @@ -28,7 +28,7 @@ class UlozToFolder(Crypter): new_links = [] for i in xrange(1, 100): - self.logInfo(_("Fetching links from page %i") % i) + self.log_info(_("Fetching links from page %i") % i) m = re.search(self.FOLDER_PATTERN, html, re.S) if m is None: self.error(_("FOLDER_PATTERN not found")) @@ -40,7 +40,7 @@ class UlozToFolder(Crypter): else: break else: - self.logInfo(_("Limit of 99 pages reached, aborting")) + self.log_info(_("Limit of 99 pages reached, aborting")) if new_links: self.urls = [map(lambda s: "http://ulozto.net/%s" % s, new_links)] diff --git a/module/plugins/crypter/UploadableChFolder.py b/module/plugins/crypter/UploadableChFolder.py index 849aaceea..0df613978 100644 --- a/module/plugins/crypter/UploadableChFolder.py +++ b/module/plugins/crypter/UploadableChFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class UploadableChFolder(SimpleCrypter): __name__ = "UploadableChFolder" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?uploadable\.ch/list/\w+' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), diff --git a/module/plugins/crypter/UploadedToFolder.py b/module/plugins/crypter/UploadedToFolder.py index 384168030..7233a1293 100644 --- a/module/plugins/crypter/UploadedToFolder.py +++ b/module/plugins/crypter/UploadedToFolder.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class UploadedToFolder(SimpleCrypter): __name__ = "UploadedToFolder" __type__ = "crypter" - __version__ = "0.43" + __version__ = "0.44" __pattern__ = r'https?://(?:www\.)?(uploaded|ul)\.(to|net)/(f|folder|list)/\w+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), diff --git a/module/plugins/crypter/WiiReloadedOrg.py b/module/plugins/crypter/WiiReloadedOrg.py index eddc0e5d1..48ab22219 100644 --- a/module/plugins/crypter/WiiReloadedOrg.py +++ b/module/plugins/crypter/WiiReloadedOrg.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class WiiReloadedOrg(DeadCrypter): __name__ = "WiiReloadedOrg" __type__ = "crypter" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'http://(?:www\.)?wii-reloaded\.org/protect/get\.php\?i=.+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/WuploadComFolder.py b/module/plugins/crypter/WuploadComFolder.py index dece467a2..d176ec292 100644 --- a/module/plugins/crypter/WuploadComFolder.py +++ b/module/plugins/crypter/WuploadComFolder.py @@ -6,7 +6,7 @@ from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class WuploadComFolder(DeadCrypter): __name__ = "WuploadComFolder" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'http://(?:www\.)?wupload\.com/folder/\w+' __config__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/crypter/XFileSharingProFolder.py b/module/plugins/crypter/XFileSharingProFolder.py index 70e7365dd..b9b1b4f23 100644 --- a/module/plugins/crypter/XFileSharingProFolder.py +++ b/module/plugins/crypter/XFileSharingProFolder.py @@ -8,7 +8,7 @@ from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo class XFileSharingProFolder(XFSCrypter): __name__ = "XFileSharingProFolder" __type__ = "crypter" - __version__ = "0.08" + __version__ = "0.09" __pattern__ = r'https?://(?:www\.)?(?:\w+\.)*?(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:user|folder)s?/\w+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), diff --git a/module/plugins/crypter/XupPl.py b/module/plugins/crypter/XupPl.py index 9dff23215..d72f69293 100644 --- a/module/plugins/crypter/XupPl.py +++ b/module/plugins/crypter/XupPl.py @@ -6,7 +6,7 @@ from module.plugins.internal.Crypter import Crypter class XupPl(Crypter): __name__ = "XupPl" __type__ = "crypter" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'https?://(?:[^/]*\.)?xup\.pl/.+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), diff --git a/module/plugins/crypter/YoutubeComFolder.py b/module/plugins/crypter/YoutubeComFolder.py index fed832b7d..4b11e1244 100644 --- a/module/plugins/crypter/YoutubeComFolder.py +++ b/module/plugins/crypter/YoutubeComFolder.py @@ -11,7 +11,7 @@ from module.utils import save_join as fs_join class YoutubeComFolder(Crypter): __name__ = "YoutubeComFolder" __type__ = "crypter" - __version__ = "1.02" + __version__ = "1.03" __pattern__ = r'https?://(?:www\.|m\.)?youtube\.com/(?P<TYPE>user|playlist|view_play_list)(/|.*?[?&](?:list|p)=)(?P<ID>[\w-]+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True ), @@ -35,7 +35,7 @@ class YoutubeComFolder(Crypter): return json_loads(html) - def getChannel(self, user): + def get_channel(self, user): channels = self.api_response("channels", {"part": "id,snippet,contentDetails", "forUsername": user, "maxResults": "50"}) if channels['items']: channel = channels['items'][0] @@ -45,7 +45,7 @@ class YoutubeComFolder(Crypter): "user": user} #: One lone channel for user? - def getPlaylist(self, p_id): + def get_playlist(self, p_id): playlists = self.api_response("playlists", {"part": "snippet", "id": p_id}) if playlists['items']: playlist = playlists['items'][0] @@ -55,7 +55,7 @@ class YoutubeComFolder(Crypter): "channelTitle": playlist['snippet']['channelTitle']} - def _getPlaylists(self, id, token=None): + def _get_playlists(self, id, token=None): req = {"part": "id", "maxResults": "50", "channelId": id} if token: req.update({"pageToken": token}) @@ -66,15 +66,15 @@ class YoutubeComFolder(Crypter): yield playlist['id'] if "nextPageToken" in playlists: - for item in self._getPlaylists(id, playlists['nextPageToken']): + for item in self._get_playlists(id, playlists['nextPageToken']): yield item - def getPlaylists(self, ch_id): - return map(self.getPlaylist, self._getPlaylists(ch_id)) + def get_playlists(self, ch_id): + return map(self.get_playlist, self._get_playlists(ch_id)) - def _getVideosId(self, id, token=None): + def _get_videos_id(self, id, token=None): req = {"part": "contentDetails", "maxResults": "50", "playlistId": id} if token: req.update({"pageToken": token}) @@ -85,12 +85,12 @@ class YoutubeComFolder(Crypter): yield item['contentDetails']['videoId'] if "nextPageToken" in playlist: - for item in self._getVideosId(id, playlist['nextPageToken']): + for item in self._get_videos_id(id, playlist['nextPageToken']): yield item - def getVideosId(self, p_id): - return list(self._getVideosId(p_id)) + def get_videos_id(self, p_id): + return list(self._get_videos_id(p_id)) def decrypt(self, pyfile): @@ -99,29 +99,29 @@ class YoutubeComFolder(Crypter): m_type = m.group('TYPE') if m_type == "user": - self.logDebug("Url recognized as Channel") + self.log_debug("Url recognized as Channel") user = m_id - channel = self.getChannel(user) + channel = self.get_channel(user) if channel: - playlists = self.getPlaylists(channel['id']) - self.logDebug("%s playlist\s found on channel \"%s\"" % (len(playlists), channel['title'])) + playlists = self.get_playlists(channel['id']) + self.log_debug("%s playlist\s found on channel \"%s\"" % (len(playlists), channel['title'])) - relatedplaylist = {p_name: self.getPlaylist(p_id) for p_name, p_id in channel['relatedPlaylists'].iteritems()} - self.logDebug("Channel's related playlists found = %s" % relatedplaylist.keys()) + relatedplaylist = {p_name: self.get_playlist(p_id) for p_name, p_id in channel['relatedPlaylists'].iteritems()} + self.log_debug("Channel's related playlists found = %s" % relatedplaylist.keys()) relatedplaylist['uploads']['title'] = "Unplaylisted videos" relatedplaylist['uploads']['checkDups'] = True #: checkDups flag for p_name, p_data in relatedplaylist.iteritems(): - if self.getConfig(p_name): + if self.get_config(p_name): p_data['title'] += " of " + user playlists.append(p_data) else: playlists = [] else: - self.logDebug("Url recognized as Playlist") - playlists = [self.getPlaylist(m_id)] + self.log_debug("Url recognized as Playlist") + playlists = [self.get_playlist(m_id)] if not playlists: self.fail(_("No playlist available")) @@ -130,15 +130,15 @@ class YoutubeComFolder(Crypter): urlize = lambda x: "https://www.youtube.com/watch?v=" + x for p in playlists: p_name = p['title'] - p_videos = self.getVideosId(p['id']) + p_videos = self.get_videos_id(p['id']) p_folder = fs_join(self.core.config.get("general", "download_folder"), p['channelTitle'], p_name) - self.logDebug("%s video\s found on playlist \"%s\"" % (len(p_videos), p_name)) + self.log_debug("%s video\s found on playlist \"%s\"" % (len(p_videos), p_name)) if not p_videos: continue elif "checkDups" in p: p_urls = [urlize(v_id) for v_id in p_videos if v_id not in addedvideos] - self.logDebug("%s video\s available on playlist \"%s\" after duplicates cleanup" % (len(p_urls), p_name)) + self.log_debug("%s video\s available on playlist \"%s\" after duplicates cleanup" % (len(p_urls), p_name)) else: p_urls = map(urlize, p_videos) |