diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-10 03:02:26 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-10 03:02:26 +0200 |
commit | 04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 (patch) | |
tree | 703010e32f62bf869551ce0d323dacf62bc448ff /module/plugins/crypter | |
parent | [SimpleCrypter] Support parseError (diff) | |
download | pyload-04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8.tar.xz |
Use parseError instead PluginParseError + unified all download pattern attributes as LINK_PATTERN + removed some old patterns (not used anymore) + other code cosmetics
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r-- | module/plugins/crypter/DdlstorageComFolder.py | 2 | ||||
-rw-r--r-- | module/plugins/crypter/DlProtectCom.py | 2 | ||||
-rw-r--r-- | module/plugins/crypter/DontKnowMe.py | 2 | ||||
-rw-r--r-- | module/plugins/crypter/FilestubeCom.py | 4 | ||||
-rw-r--r-- | module/plugins/crypter/FiletramCom.py | 4 | ||||
-rw-r--r-- | module/plugins/crypter/GooGl.py | 2 | ||||
-rw-r--r-- | module/plugins/crypter/LinkSaveIn.py | 4 | ||||
-rw-r--r-- | module/plugins/crypter/LixIn.py | 2 | ||||
-rw-r--r-- | module/plugins/crypter/MediafireComFolder.py | 3 | ||||
-rw-r--r-- | module/plugins/crypter/NosvideoCom.py | 2 | ||||
-rw-r--r-- | module/plugins/crypter/RelinkUs.py | 25 | ||||
-rw-r--r-- | module/plugins/crypter/YoutubeBatch.py | 2 |
12 files changed, 28 insertions, 26 deletions
diff --git a/module/plugins/crypter/DdlstorageComFolder.py b/module/plugins/crypter/DdlstorageComFolder.py index 6501de822..ef43edc5b 100644 --- a/module/plugins/crypter/DdlstorageComFolder.py +++ b/module/plugins/crypter/DdlstorageComFolder.py @@ -26,4 +26,4 @@ class DdlstorageComFolder(SimpleCrypter): __author_name__ = ("godofdream", "stickell") __author_mail__ = ("soilfiction@gmail.com", "l.stickell@yahoo.it") - LINK_PATTERN = '<a class="sub_title" style="text-decoration:none;" href="(http://www.ddlstorage.com/.*)">' + LINK_PATTERN = r'<a class="sub_title" style="text-decoration:none;" href="(http://www.ddlstorage.com/.*)">' diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index dbe5bf705..780708884 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -32,7 +32,7 @@ class DlProtectCom(SimpleCrypter): __author_name__ = "Walter Purcaro" __author_mail__ = "vuolter@gmail.com" - OFFLINE_PATTERN = ">Unfortunately, the link you are looking for is not found" + OFFLINE_PATTERN = r'>Unfortunately, the link you are looking for is not found' def getLinks(self): # Direct link with redirect diff --git a/module/plugins/crypter/DontKnowMe.py b/module/plugins/crypter/DontKnowMe.py index 42a38e98f..092834325 100644 --- a/module/plugins/crypter/DontKnowMe.py +++ b/module/plugins/crypter/DontKnowMe.py @@ -15,7 +15,7 @@ class DontKnowMe(Crypter): __author_name__ = "selaux" __author_mail__ = "" - LINK_PATTERN = r"http://dontknow.me/at/\?(.+)$" + LINK_PATTERN = r'http://dontknow.me/at/\?(.+)$' def decrypt(self, pyfile): link = re.findall(self.LINK_PATTERN, pyfile.url)[0] diff --git a/module/plugins/crypter/FilestubeCom.py b/module/plugins/crypter/FilestubeCom.py index f4f09e878..ac67c33c9 100644 --- a/module/plugins/crypter/FilestubeCom.py +++ b/module/plugins/crypter/FilestubeCom.py @@ -26,5 +26,5 @@ class FilestubeCom(SimpleCrypter): __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" - LINK_PATTERN = r"<a class=\"file-link-main(?: noref)?\" [^>]* href=\"(http://[^\"]+)" - TITLE_PATTERN = r"<h1\s*> (?P<title>.+) download\s*</h1>" + LINK_PATTERN = r'<a class=\"file-link-main(?: noref)?\" [^>]* href=\"(http://[^\"]+)' + TITLE_PATTERN = r'<h1\s*> (?P<title>.+) download\s*</h1>' diff --git a/module/plugins/crypter/FiletramCom.py b/module/plugins/crypter/FiletramCom.py index 8cdf32ad5..5a587eda2 100644 --- a/module/plugins/crypter/FiletramCom.py +++ b/module/plugins/crypter/FiletramCom.py @@ -26,5 +26,5 @@ class FiletramCom(SimpleCrypter): __author_name__ = ("igel", "stickell") __author_mail__ = ("igelkun@myopera.com", "l.stickell@yahoo.it") - LINK_PATTERN = r"\s+(http://.+)" - TITLE_PATTERN = r"<title>(?P<title>[^<]+) - Free Download[^<]*</title>" + LINK_PATTERN = r'\s+(http://.+)' + TITLE_PATTERN = r'<title>(?P<title>[^<]+) - Free Download[^<]*</title>' diff --git a/module/plugins/crypter/GooGl.py b/module/plugins/crypter/GooGl.py index 15f0a9a8c..343bce5fd 100644 --- a/module/plugins/crypter/GooGl.py +++ b/module/plugins/crypter/GooGl.py @@ -27,7 +27,7 @@ class GooGl(Crypter): __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" - API_URL = 'https://www.googleapis.com/urlshortener/v1/url' + API_URL = "https://www.googleapis.com/urlshortener/v1/url" def decrypt(self, pyfile): rep = self.load(self.API_URL, get={'shortUrl': pyfile.url}) diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py index 85dde6c87..13277e3f3 100644 --- a/module/plugins/crypter/LinkSaveIn.py +++ b/module/plugins/crypter/LinkSaveIn.py @@ -27,7 +27,7 @@ class LinkSaveIn(Crypter): # Constants _JK_KEY_ = "jk" _CRYPTED_KEY_ = "crypted" - HOSTER_DOMAIN = "linksave.in" + HOSTER_NAME = "linksave.in" def setup(self): self.html = None @@ -41,7 +41,7 @@ class LinkSaveIn(Crypter): # Init self.package = pyfile.package() self.fileid = re.match(self.__pattern__, pyfile.url).group('id') - self.req.cj.setCookie(self.HOSTER_DOMAIN, "Linksave_Language", "english") + self.req.cj.setCookie(self.HOSTER_NAME, "Linksave_Language", "english") # Request package self.html = self.load(pyfile.url) diff --git a/module/plugins/crypter/LixIn.py b/module/plugins/crypter/LixIn.py index 619a474f2..8fca7dc02 100644 --- a/module/plugins/crypter/LixIn.py +++ b/module/plugins/crypter/LixIn.py @@ -14,7 +14,7 @@ class LixIn(Crypter): __author_name__ = "spoob" __author_mail__ = "spoob@pyload.org" - CAPTCHA_PATTERN = '<img src="(?P<image>captcha_img.php\?.*?)"' + CAPTCHA_PATTERN = r'<img src="(?P<image>captcha_img.php\?.*?)"' SUBMIT_PATTERN = r"value='continue.*?'" LINK_PATTERN = r'name="ifram" src="(?P<link>.*?)"' diff --git a/module/plugins/crypter/MediafireComFolder.py b/module/plugins/crypter/MediafireComFolder.py index 46856229c..1ab16f31f 100644 --- a/module/plugins/crypter/MediafireComFolder.py +++ b/module/plugins/crypter/MediafireComFolder.py @@ -16,7 +16,8 @@ class MediafireComFolder(Crypter): __author_mail__ = "zoidberg@mujmail.cz" FOLDER_KEY_PATTERN = r"var afI= '(\w+)';" - FILE_URL_PATTERN = '<meta property="og:url" content="http://www.mediafire.com/\?(\w+)"/>' + FILE_URL_PATTERN = r'<meta property="og:url" content="http://www.mediafire.com/\?(\w+)"/>' + def decrypt(self, pyfile): new_links = [] diff --git a/module/plugins/crypter/NosvideoCom.py b/module/plugins/crypter/NosvideoCom.py index 63e199a7a..20097c7bf 100644 --- a/module/plugins/crypter/NosvideoCom.py +++ b/module/plugins/crypter/NosvideoCom.py @@ -13,4 +13,4 @@ class NosvideoCom(SimpleCrypter): __author_mail__ = "igelkun@myopera.com" LINK_PATTERN = r'href="(http://(?:w{3}\.)?nosupload.com/\?d=\w+)"' - TITLE_PATTERN = r"<[tT]itle>Watch (?P<title>.+)</[tT]itle>" + TITLE_PATTERN = r'<[tT]itle>Watch (?P<title>.+)</[tT]itle>' diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index aad55c867..f6503374f 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -21,27 +21,28 @@ class RelinkUs(Crypter): # Constants PREFERRED_LINK_SOURCES = ['cnl2', 'dlc', 'web'] - OFFLINE_TOKEN = "<title>Tattooside" - PASSWORD_TOKEN = "container_password.php" - PASSWORD_ERROR_ROKEN = "You have entered an incorrect password" - PASSWORD_SUBMIT_URL = "http://www.relink.us/container_password.php" - CAPTCHA_TOKEN = "container_captcha.php" - CAPTCHA_ERROR_ROKEN = "You have solved the captcha wrong" - CAPTCHA_IMG_URL = "http://www.relink.us/core/captcha/circlecaptcha.php" - CAPTCHA_SUBMIT_URL = "http://www.relink.us/container_captcha.php" - FILE_TITLE_REGEX = r"<th>Title</th><td><i>(.*)</i></td></tr>" - FILE_NOTITLE = 'No title' + OFFLINE_TOKEN = r'<title>Tattooside' + PASSWORD_TOKEN = r'container_password\.php' + PASSWORD_ERROR_ROKEN = r'You have entered an incorrect password' + PASSWORD_SUBMIT_URL = r'http://www\.relink\.us/container_password\.php' + CAPTCHA_TOKEN = r'container_captcha\.php' + CAPTCHA_ERROR_ROKEN = r'You have solved the captcha wrong' + CAPTCHA_IMG_URL = r'http://www\.relink\.us/core/captcha/circlecaptcha\.php' + CAPTCHA_SUBMIT_URL = r'http://www\.relink\.us/container_captcha\.php' + FILE_TITLE_REGEX = r'<th>Title</th><td><i>(.*)</i></td></tr>' + FILE_NOTITLE = r'No title' CNL2_FORM_REGEX = r'<form id="cnl_form-(.*?)</form>' CNL2_FORMINPUT_REGEX = r'<input.*?name="%s".*?value="(.*?)"' CNL2_JK_KEY = "jk" CNL2_CRYPTED_KEY = "crypted" DLC_LINK_REGEX = r'<a href=".*?" class="dlc_button" target="_blank">' - DLC_DOWNLOAD_URL = "http://www.relink.us/download.php" + DLC_DOWNLOAD_URL = r'http://www\.relink\.us/download\.php' WEB_FORWARD_REGEX = r"getFile\('(?P<link>.+)'\)" - WEB_FORWARD_URL = "http://www.relink.us/frame.php" + WEB_FORWARD_URL = r'http://www\.relink\.us/frame\.php' WEB_LINK_REGEX = r'<iframe name="Container" height="100%" frameborder="no" width="100%" src="(?P<link>.+)"></iframe>' + def setup(self): self.fileid = None self.package = None diff --git a/module/plugins/crypter/YoutubeBatch.py b/module/plugins/crypter/YoutubeBatch.py index 4ba1a3c70..ade31df21 100644 --- a/module/plugins/crypter/YoutubeBatch.py +++ b/module/plugins/crypter/YoutubeBatch.py @@ -24,7 +24,7 @@ from module.common.json_layer import json_loads from module.plugins.Crypter import Crypter from module.utils import save_join -API_KEY = "AIzaSyCKnWLNlkX-L4oD1aEzqqhRw1zczeD6_k0" +API_URL = "AIzaSyCKnWLNlkX-L4oD1aEzqqhRw1zczeD6_k0" class YoutubeBatch(Crypter): |