diff options
Diffstat (limited to 'module')
40 files changed, 56 insertions, 56 deletions
diff --git a/module/plugins/accounts/DebridItaliaCom.py b/module/plugins/accounts/DebridItaliaCom.py index c8bc89159..754d3467d 100644 --- a/module/plugins/accounts/DebridItaliaCom.py +++ b/module/plugins/accounts/DebridItaliaCom.py @@ -16,7 +16,7 @@ class DebridItaliaCom(Account): __authors__ = [("stickell", "l.stickell@yahoo.it")] - WALID_UNTIL_PATTERN = r"Premium valid till: (?P<D>[^|]+) \|" + WALID_UNTIL_PATTERN = r'Premium valid till: (?P<D>[^|]+) \|' def loadAccountInfo(self, user, req): diff --git a/module/plugins/accounts/FilerNet.py b/module/plugins/accounts/FilerNet.py index 811d7c8a1..a459f88f0 100644 --- a/module/plugins/accounts/FilerNet.py +++ b/module/plugins/accounts/FilerNet.py @@ -18,7 +18,7 @@ class FilerNet(Account): TOKEN_PATTERN = r'_csrf_token" value="([^"]+)" />' - WALID_UNTIL_PATTERN = r"Der Premium-Zugang ist gültig bis (.+)\.\s*</td>" + WALID_UNTIL_PATTERN = r'Der Premium-Zugang ist gültig bis (.+)\.\s*</td>' TRAFFIC_PATTERN = r'Traffic</th>\s*<td>([^<]+)</td>' FREE_PATTERN = r'Account Status</th>\s*<td>\s*Free' diff --git a/module/plugins/accounts/FreakshareCom.py b/module/plugins/accounts/FreakshareCom.py index 904c3ba3e..86f2b5a3e 100644 --- a/module/plugins/accounts/FreakshareCom.py +++ b/module/plugins/accounts/FreakshareCom.py @@ -19,12 +19,12 @@ class FreakshareCom(Account): def loadAccountInfo(self, user, req): page = req.load("http://freakshare.com/") - validuntil = r"ltig bis:</td>\s*<td><b>([\d.:-]+)</b></td>" + validuntil = r'ltig bis:</td>\s*<td><b>([\d.:-]+)</b></td>' validuntil = re.search(validuntil, page, re.MULTILINE) validuntil = validuntil.group(1).strip() validuntil = mktime(strptime(validuntil, "%d.%m.%Y - %H:%M")) - traffic = r"Traffic verbleibend:</td>\s*<td>([^<]+)" + traffic = r'Traffic verbleibend:</td>\s*<td>([^<]+)' traffic = re.search(traffic, page, re.MULTILINE) traffic = traffic.group(1).strip() traffic = self.parseTraffic(traffic) diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py index 01d6f4476..4bb4c7124 100755 --- a/module/plugins/accounts/NetloadIn.py +++ b/module/plugins/accounts/NetloadIn.py @@ -19,7 +19,7 @@ class NetloadIn(Account): def loadAccountInfo(self, user, req): page = req.load("http://netload.in/index.php?id=2&lang=de") - left = r">(\d+) (Tag|Tage), (\d+) Stunden<" + left = r'>(\d+) (Tag|Tage), (\d+) Stunden<' left = re.search(left, page) if left: validuntil = time() + int(left.group(1)) * 24 * 60 * 60 + int(left.group(3)) * 60 * 60 diff --git a/module/plugins/crypter/DataHuFolder.py b/module/plugins/crypter/DataHuFolder.py index c4dd21d30..86e816c04 100644 --- a/module/plugins/crypter/DataHuFolder.py +++ b/module/plugins/crypter/DataHuFolder.py @@ -18,7 +18,7 @@ class DataHuFolder(SimpleCrypter): ("stickell", "l.stickell@yahoo.it")] - LINK_PATTERN = r"<a href='(http://data\.hu/get/.+)' target='_blank'>\1</a>" + LINK_PATTERN = r'<a href=\'(http://data\.hu/get/.+)\' target=\'_blank\'>\1</a>' TITLE_PATTERN = ur'<title>(.+) Let\xf6lt\xe9se</title>' diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py index af3679122..81768e457 100644 --- a/module/plugins/crypter/LinkSaveIn.py +++ b/module/plugins/crypter/LinkSaveIn.py @@ -178,7 +178,7 @@ class LinkSaveIn(SimpleCrypter): self.logDebug("Seach 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" (this is probably a bug)' % type_) - pattern = r"\('%s_link'\).href=unescape\('(.*?\.%s)'\)" % (type_, type_) + pattern = r'\(\'%s_link\'\).href=unescape\(\'(.*?\.%s)\'\)' % (type_, type_) containersLinks = re.findall(pattern, self.html) self.logDebug("Found %d %s Container links" % (len(containersLinks), type_.upper())) for containerLink in containersLinks: diff --git a/module/plugins/crypter/LixIn.py b/module/plugins/crypter/LixIn.py index 28b72237b..32423e228 100644 --- a/module/plugins/crypter/LixIn.py +++ b/module/plugins/crypter/LixIn.py @@ -18,7 +18,7 @@ class LixIn(Crypter): CAPTCHA_PATTERN = r'<img src="(?P<image>captcha_img\.php\?.*?)"' - SUBMIT_PATTERN = r"value='continue.*?'" + 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 47ddf6bcb..fce8be8d6 100644 --- a/module/plugins/crypter/MediafireComFolder.py +++ b/module/plugins/crypter/MediafireComFolder.py @@ -18,7 +18,7 @@ class MediafireComFolder(Crypter): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - FOLDER_KEY_PATTERN = r"var afI= '(\w+)';" + FOLDER_KEY_PATTERN = r'var afI= \'(\w+)' FILE_URL_PATTERN = r'<meta property="og:url" content="http://www\.mediafire\.com/\?(\w+)"/>' diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index 9eb242363..64ce973e8 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -231,7 +231,7 @@ class NCryptIn(Crypter): self.logDebug("Handling Container links") package_links = [] - pattern = r"/container/(rsdf|dlc|ccf)/(\w+)" + pattern = r'/container/(rsdf|dlc|ccf)/(\w+)' containersLinks = re.findall(pattern, self.html) self.logDebug("Decrypting %d Container links" % len(containersLinks)) for containerLink in containersLinks: @@ -243,7 +243,7 @@ class NCryptIn(Crypter): def handleWebLinks(self): self.logDebug("Handling Web links") - pattern = r"(http://ncrypt\.in/link-.*?=)" + pattern = r'(http://ncrypt\.in/link-.*?=)' links = re.findall(pattern, self.html) package_links = [] diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index 7b6dff328..d99b7fb1a 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -41,7 +41,7 @@ class RelinkUs(Crypter): CNL2_CRYPTED_KEY = "crypted" DLC_LINK_REGEX = r'<a href=".*?" class="dlc_button" target="_blank">' DLC_DOWNLOAD_URL = r'http://www\.relink\.us/download\.php' - WEB_FORWARD_REGEX = r"getFile\('(?P<link>.+)'\)" + WEB_FORWARD_REGEX = r'getFile\(\'(?P<link>.+)\'\)' 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>' diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index af2e5245f..9d4cfbb43 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -178,7 +178,7 @@ class ShareLinksBiz(Crypter): self.logDebug("Handling Web links") #@TODO: Gather paginated web links - pattern = r"javascript:_get\('(.*?)', \d+, ''\)" + pattern = r'javascript:_get\(\'(.*?)\', \d+, \'\'\)' ids = re.findall(pattern, self.html) self.logDebug("Decrypting %d Web links" % len(ids)) for i, ID in enumerate(ids): @@ -204,7 +204,7 @@ class ShareLinksBiz(Crypter): package_links = [] self.logDebug("Handling Container links") - pattern = r"javascript:_get\('(.*?)', 0, '(rsdf|ccf|dlc)'\)" + pattern = r'javascript:_get\(\'(.*?)\', 0, \'(rsdf|ccf|dlc)\'\)' containersLinks = re.findall(pattern, self.html) self.logDebug("Decrypting %d Container links" % len(containersLinks)) for containerLink in containersLinks: diff --git a/module/plugins/crypter/TurbobitNetFolder.py b/module/plugins/crypter/TurbobitNetFolder.py index b0f341209..390520d88 100644 --- a/module/plugins/crypter/TurbobitNetFolder.py +++ b/module/plugins/crypter/TurbobitNetFolder.py @@ -19,7 +19,7 @@ class TurbobitNetFolder(SimpleCrypter): ("Walter Purcaro", "vuolter@gmail.com")] - TITLE_PATTERN = r"src='/js/lib/grid/icon/folder.png'> <span>(.+?)</span>" + TITLE_PATTERN = r'src=\'/js/lib/grid/icon/folder.png\'> <span>(.+?)</span>' def _getLinks(self, id, page=1): diff --git a/module/plugins/hooks/LinkdecrypterCom.py b/module/plugins/hooks/LinkdecrypterCom.py index df1fbee9a..de08e406a 100644 --- a/module/plugins/hooks/LinkdecrypterCom.py +++ b/module/plugins/hooks/LinkdecrypterCom.py @@ -46,7 +46,7 @@ class LinkdecrypterCom(Hook): self.logError(_("Crypter list is empty")) return - regexp = r"https?://([^.]+\.)*?(%s)/.*" % "|".join(online) + regexp = r'https?://([^.]+\.)*?(%s)/.*' % '|'.join(online) dict = self.core.pluginManager.crypterPlugins[self.__name__] dict['pattern'] = regexp diff --git a/module/plugins/hooks/XFileSharingPro.py b/module/plugins/hooks/XFileSharingPro.py index 46c693cf6..741912457 100644 --- a/module/plugins/hooks/XFileSharingPro.py +++ b/module/plugins/hooks/XFileSharingPro.py @@ -61,7 +61,7 @@ class XFileSharingPro(Hook): self.unload() return - regexp = r"http://(?:[^/]*\.)?(%s)/(?:embed-)?\w{12}" % ("|".join(sorted(hoster_list)).replace('.', '\.')) + regexp = r'http://(?:[^/]*\.)?(%s)/(?:embed-)?\w{12}' % ('|'.join(sorted(hoster_list)).replace('.', '\.')) dict = self.core.pluginManager.hosterPlugins['XFileSharingPro'] dict['pattern'] = regexp diff --git a/module/plugins/hoster/BayfilesCom.py b/module/plugins/hoster/BayfilesCom.py index 98c5d27ba..5f097ee2f 100644 --- a/module/plugins/hoster/BayfilesCom.py +++ b/module/plugins/hoster/BayfilesCom.py @@ -26,7 +26,7 @@ class BayfilesCom(SimpleHoster): WAIT_PATTERN = r'>Your IP [\d.]* has recently downloaded a file\. Upgrade to premium or wait (\d+) minutes\.<' VARS_PATTERN = r'var vfid = (\d+);\s*var delay = (\d+);' - FREE_LINK_PATTERN = r"javascript:window.location.href = '([^']+)';" + FREE_LINK_PATTERN = r'javascript:window\.location\.href = \'(.+?)\';' PREMIUM_LINK_PATTERN = r'(?:<a class="highlighted-btn" href="|(?=http://s\d+\.baycdn\.com/dl/))(.*?)"' diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index 42946fdf8..b62e88278 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -20,7 +20,7 @@ class CrockoCom(SimpleHoster): FILE_NAME_PATTERN = r'<span class="fz24">Download:\s*<strong>(?P<N>.*)' FILE_SIZE_PATTERN = r'<span class="tip1"><span class="inner">(?P<S>[^<]+)</span></span>' - OFFLINE_PATTERN = r"<h1>Sorry,<br />the page you're looking for <br />isn't here.</h1>|File not found" + OFFLINE_PATTERN = r'<h1>Sorry,<br />the page you\'re looking for <br />isn\'t here.</h1>|File not found' CAPTCHA_URL_PATTERN = re.compile(r"u='(/file_contents/captcha/\w+)';\s*w='(\d+)';") diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index 8ca4fd8a5..9d2b8b35f 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -34,7 +34,7 @@ class CzshareCom(SimpleHoster): FREE_FORM_PATTERN = r'<form action="download\.php" method="post">\s*<img src="captcha\.php" id="captcha" />(.*?)</form>' PREMIUM_FORM_PATTERN = r'<form action="/profi_down\.php" method="post">(.*?)</form>' FORM_INPUT_PATTERN = r'<input[^>]* name="([^"]+)" value="([^"]+)"[^>]*/>' - MULTIDL_PATTERN = r"<p><font color='red'>Z[^<]*PROFI.</font></p>" + MULTIDL_PATTERN = r'<p><font color=\'red\'>Z[^<]*PROFI.</font></p>' USER_CREDIT_PATTERN = r'<div class="credit">\s*kredit: <strong>([\d .,]+)(\w+)</strong>\s*</div><!-- .credit -->' diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py index 85e8e0eb3..b3ed346fe 100644 --- a/module/plugins/hoster/DlFreeFr.py +++ b/module/plugins/hoster/DlFreeFr.py @@ -125,7 +125,7 @@ class DlFreeFr(SimpleHoster): FILE_NAME_PATTERN = r'Fichier:</td>\s*<td[^>]*>(?P<N>[^>]*)</td>' FILE_SIZE_PATTERN = r'Taille:</td>\s*<td[^>]*>(?P<S>[\d.,]+\w)o' - OFFLINE_PATTERN = r"Erreur 404 - Document non trouv|Fichier inexistant|Le fichier demandé n'a pas été trouvé" + OFFLINE_PATTERN = r'Erreur 404 - Document non trouv|Fichier inexistant|Le fichier demandé n\'a pas été trouvé' def setup(self): diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py index 6d60bf793..da7683160 100644 --- a/module/plugins/hoster/FilecloudIo.py +++ b/module/plugins/hoster/FilecloudIo.py @@ -25,10 +25,10 @@ class FilecloudIo(SimpleHoster): OFFLINE_PATTERN = r'l10n\.(FILES__DOESNT_EXIST|REMOVED)' TEMP_OFFLINE_PATTERN = r'l10n\.FILES__WARNING' - UKEY_PATTERN = r"'ukey'\s*:'(\w+)'," - AB1_PATTERN = r"if\( __ab1 == '(\w+)' \)" + UKEY_PATTERN = r'\'ukey\'\s*:\'(\w+)' + AB1_PATTERN = r'if\( __ab1 == \'(\w+)\' \)' ERROR_MSG_PATTERN = r'var __error_msg\s*=\s*l10n\.(.*?);' - RECAPTCHA_PATTERN = r"var __recaptcha_public\s*=\s*'([^']+)';" + RECAPTCHA_PATTERN = r'var __recaptcha_public\s*=\s*\'(.+?)\';' LINK_PATTERN = r'"(http://s\d+\.filecloud\.io/%s/\d+/.*?)"' diff --git a/module/plugins/hoster/FileomCom.py b/module/plugins/hoster/FileomCom.py index 80ee35c1c..6c8be59da 100644 --- a/module/plugins/hoster/FileomCom.py +++ b/module/plugins/hoster/FileomCom.py @@ -27,7 +27,7 @@ class FileomCom(XFSPHoster): ERROR_PATTERN = r'class=["\']err["\'][^>]*>(.*?)(?:\'|</)' - LINK_PATTERN = r"var url2 = '(.+?)';" + LINK_PATTERN = r'var url2 = \'(.+?)\';' def setup(self): diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py index 1412a63e8..4449ae2c2 100644 --- a/module/plugins/hoster/FilepostCom.py +++ b/module/plugins/hoster/FilepostCom.py @@ -25,8 +25,8 @@ class FilepostCom(SimpleHoster): OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File. </div>|<div class="file_info file_info_deleted">' PREMIUM_ONLY_PATTERN = r'members only. Please upgrade to premium|a premium membership is required to download this file' - RECAPTCHA_PATTERN = r"Captcha.init\({\s*key:\s*'([^']+)'" - FLP_TOKEN_PATTERN = r"set_store_options\({token: '([^']+)'" + RECAPTCHA_PATTERN = r'Captcha.init\({\s*key:\s*\'(.+?)\'' + FLP_TOKEN_PATTERN = r'set_store_options\({token: \'(.+?)\'' def handleFree(self): diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index ae38ee890..4e722eb9f 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -50,7 +50,7 @@ class FileserveCom(Hoster): LINKCHECK_TR = r'<tr>\s*(<td>http://www\.fileserve\.com/file/.*?)</tr>' LINKCHECK_TD = r'<td>(?:<[^>]*>| )*([^<]*)' - CAPTCHA_KEY_PATTERN = r"var reCAPTCHA_publickey='(?P<key>[^']+)'" + CAPTCHA_KEY_PATTERN = r'var reCAPTCHA_publickey=\'(?P<key>.+?)\'' LONG_WAIT_PATTERN = r'<li class="title">You need to wait (\d+) (\w+) to start another download\.</li>' LINK_EXPIRED_PATTERN = r'Your download link has expired' DAILY_LIMIT_PATTERN = r'Your daily download limit has been reached' diff --git a/module/plugins/hoster/GamefrontCom.py b/module/plugins/hoster/GamefrontCom.py index a9faf6783..b7e7f0bc8 100644 --- a/module/plugins/hoster/GamefrontCom.py +++ b/module/plugins/hoster/GamefrontCom.py @@ -21,7 +21,7 @@ class GamefrontCom(Hoster): PATTERN_FILENAME = r'<title>(.*?) | Game Front' PATTERN_FILESIZE = r'<dt>File Size:</dt>[\n\s]*<dd>(.*?)</dd>' - PATTERN_OFFLINE = r"This file doesn't exist, or has been removed." + PATTERN_OFFLINE = r'This file doesn\'t exist, or has been removed.' def setup(self): diff --git a/module/plugins/hoster/IfileIt.py b/module/plugins/hoster/IfileIt.py index e368f5f78..6fb8e992f 100644 --- a/module/plugins/hoster/IfileIt.py +++ b/module/plugins/hoster/IfileIt.py @@ -20,7 +20,7 @@ class IfileIt(SimpleHoster): LINK_PATTERN = r'</span> If it doesn\'t, <a target="_blank" href="([^"]+)">' - RECAPTCHA_PATTERN = r"var __recaptcha_public\s*=\s*'([^']+)';" + RECAPTCHA_PATTERN = r'var __recaptcha_public\s*=\s*\'(.+?)\'' FILE_INFO_PATTERN = r'<span style="cursor: default;[^>]*>\s*(?P<N>.*?)\s* \s*<strong>\s*(?P<S>[\d.,]+)\s*(?P<U>\w+)\s*</strong>\s*</span>' OFFLINE_PATTERN = r'<span style="cursor: default;[^>]*>\s* \s*<strong>\s*</strong>\s*</span>' TEMP_OFFLINE_PATTERN = r'<span class="msg_red">Downloading of this file is temporarily disabled</span>' diff --git a/module/plugins/hoster/IfolderRu.py b/module/plugins/hoster/IfolderRu.py index 63b49dad8..774761049 100644 --- a/module/plugins/hoster/IfolderRu.py +++ b/module/plugins/hoster/IfolderRu.py @@ -24,7 +24,7 @@ class IfolderRu(SimpleHoster): SESSION_ID_PATTERN = r'<a href=(http://ints\.(?:rusfolder\.com|ifolder\.ru)/ints/sponsor/\?bi=\d*&session=([^&]+)&u=[^>]+)>' INTS_SESSION_PATTERN = r'\(\'ints_session\'\);\s*if\(tag\)\{tag\.value = "([^"]+)";\}' - HIDDEN_INPUT_PATTERN = r"var v = .*?name='([^']+)' value='1'" + HIDDEN_INPUT_PATTERN = r'var v = .*?name=\'(.+?)\' value=\'1\'' LINK_PATTERN = r'<a id="download_file_href" href="([^"]+)"' WRONG_CAPTCHA_PATTERN = ur'<font color=Red>неверный код,<br>введите еще раз</font><br>' diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py index 68d768b7c..17e638a18 100644 --- a/module/plugins/hoster/LetitbitNet.py +++ b/module/plugins/hoster/LetitbitNet.py @@ -51,7 +51,7 @@ class LetitbitNet(SimpleHoster): HOSTER_NAME = "letitbit.net" SECONDS_PATTERN = r'seconds\s*=\s*(\d+);' - CAPTCHA_CONTROL_FIELD = r"recaptcha_control_field\s=\s'(?P<value>[^']+)'" + CAPTCHA_CONTROL_FIELD = r'recaptcha_control_field\s=\s\'(?P<value>.+?)\'' def setup(self): diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 99acc5ef8..1637adac0 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -20,7 +20,7 @@ class LuckyShareNet(SimpleHoster): __authors__ = [("stickell", "l.stickell@yahoo.it")] - FILE_INFO_PATTERN = r"<h1 class='file_name'>(?P<N>\S+)</h1>\s*<span class='file_size'>Filesize: (?P<S>[\d.,]+)(?P<U>\w+)</span>" + FILE_INFO_PATTERN = r'<h1 class=\'file_name\'>(?P<N>\S+)</h1>\s*<span class=\'file_size\'>Filesize: (?P<S>[\d.,]+)(?P<U>\w+)</span>' OFFLINE_PATTERN = r'There is no such file available' diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py index 187ef4c2a..6d29d4db3 100644 --- a/module/plugins/hoster/MediafireCom.py +++ b/module/plugins/hoster/MediafireCom.py @@ -58,13 +58,13 @@ class MediafireCom(SimpleHoster): LINK_PATTERN = r'<div class="download_link"[^>]*(?:z-index:(?P<zindex>\d+))?[^>]*>\s*<a href="(?P<href>http://[^"]+)"' - JS_KEY_PATTERN = r"DoShow\('mfpromo1'\);[^{]*{((\w+)='';.*?)eval\(\2\);" - JS_ZMODULO_PATTERN = r"\('z-index'\)\) \% (\d+)\)\);" + JS_KEY_PATTERN = r'DoShow\(\'mfpromo1\'\);[^{]*{((\w+)=\'\';.*?)eval\(\2\);' + JS_ZMODULO_PATTERN = r'\(\'z-index\'\)\) \% (\d+)\)\);' PAGE1_ACTION_PATTERN = r'<link rel="canonical" href="([^"]+)"/>' PASSWORD_PATTERN = r'<form name="form_password"' FILE_NAME_PATTERN = r'<META NAME="description" CONTENT="(?P<N>[^"]+)"/>' - FILE_INFO_PATTERN = r"oFileSharePopup\.ald\('(?P<ID>[^']*)','(?P<N>[^']*)','(?P<S>[^']*)','','(?P<sha256>[^']*)'\)" + FILE_INFO_PATTERN = r'oFileSharePopup\.ald\(\'(?P<ID>[^\']*)\',\'(?P<N>[^\']*)\',\'(?P<S>[^\']*)\',\'\',\'(?P<sha256>[^\']*)\'\)' OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File. </div>' diff --git a/module/plugins/hoster/MyvideoDe.py b/module/plugins/hoster/MyvideoDe.py index be2482970..1f02b5b69 100644 --- a/module/plugins/hoster/MyvideoDe.py +++ b/module/plugins/hoster/MyvideoDe.py @@ -34,7 +34,7 @@ class MyvideoDe(Hoster): return file_url def get_file_name(self): - file_name_pattern = r"<h1 class='globalHd'>(.*)</h1>" + file_name_pattern = r'<h1 class=\'globalHd\'>(.*)</h1>' return unescape(re.search(file_name_pattern, self.html).group(1).replace("/", "") + '.flv') def file_exists(self): diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index becfa56dd..0c255afbe 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -229,13 +229,13 @@ class NetloadIn(Hoster): def get_file_url(self, page): try: - file_url_pattern = r"<a class=\"Orange_Link\" href=\"(http://.+)\".?>Or click here" + file_url_pattern = r'<a class="Orange_Link" href="(http://.+)".?>Or click here' attempt = re.search(file_url_pattern, page) if attempt is not None: return attempt.group(1) else: self.logDebug("Netload: Backup try for final link") - file_url_pattern = r"<a href=\"(.+)\" class=\"Orange_Link\">Click here" + file_url_pattern = r'<a href="(.+)" class="Orange_Link">Click here' attempt = re.search(file_url_pattern, page) return "http://netload.in/" + attempt.group(1) except: diff --git a/module/plugins/hoster/PromptfileCom.py b/module/plugins/hoster/PromptfileCom.py index 8d2f7c750..548f510fe 100644 --- a/module/plugins/hoster/PromptfileCom.py +++ b/module/plugins/hoster/PromptfileCom.py @@ -21,7 +21,7 @@ class PromptfileCom(SimpleHoster): OFFLINE_PATTERN = r'<span style="[^"]*" title="File Not Found">File Not Found</span>' CHASH_PATTERN = r'<input type="hidden" name="chash" value="([^"]*)" />' - LINK_PATTERN = r"clip: {\s*url: '(https?://(?:www\.)promptfile[^']*)'," + LINK_PATTERN = r'clip: {\s*url: \'(https?://(?:www\.)promptfile[^\']*)\',' def handleFree(self): diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index 37b36ecfe..639e70ffa 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -32,11 +32,11 @@ class RapidgatorNet(SimpleHoster): FILE_SIZE_PATTERN = r'File size:\s*<strong>(?P<S>[\d.,]+) (?P<U>\w+)</strong>' OFFLINE_PATTERN = r'>(File not found|Error 404)' - JSVARS_PATTERN = r"\s+var\s*(startTimerUrl|getDownloadUrl|captchaUrl|fid|secs)\s*=\s*'?(.*?)'?;" + JSVARS_PATTERN = r'\s+var\s*(startTimerUrl|getDownloadUrl|captchaUrl|fid|secs)\s*=\s*\'?(.*?)\'?;' PREMIUM_ONLY_ERROR_PATTERN = r'You can download files up to|This file can be downloaded by premium only<' DOWNLOAD_LIMIT_ERROR_PATTERN = r'You have reached your (daily|hourly) downloads limit' WAIT_PATTERN = r'(?:Delay between downloads must be not less than|Try again in)\s*(\d+)\s*(hour|min)' - LINK_PATTERN = r"return '(http://\w+.rapidgator.net/.*)';" + LINK_PATTERN = r'return \'(http://\w+.rapidgator.net/.*)\';' RECAPTCHA_PATTERN = r'"http://api\.recaptcha\.net/challenge\?k=(.*?)"' ADSCAPTCHA_PATTERN = r'(http://api\.adscaptcha\.com/Get\.aspx[^"\']*)' diff --git a/module/plugins/hoster/SpeedyshareCom.py b/module/plugins/hoster/SpeedyshareCom.py index 11b327475..c3acfc1e8 100644 --- a/module/plugins/hoster/SpeedyshareCom.py +++ b/module/plugins/hoster/SpeedyshareCom.py @@ -15,7 +15,7 @@ class SpeedyshareCom(SimpleHoster): __type__ = "hoster" __version__ = "0.02" - __pattern__ = r"https?://(?:www\.)?(speedyshare\.com|speedy\.sh)/\w+" + __pattern__ = r'https?://(?:www\.)?(speedyshare\.com|speedy\.sh)/\w+' __description__ = """Speedyshare.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py index 1eb3c98e9..c48bbd8b8 100644 --- a/module/plugins/hoster/TurbobitNet.py +++ b/module/plugins/hoster/TurbobitNet.py @@ -36,7 +36,7 @@ class TurbobitNet(SimpleHoster): COOKIES = [(".turbobit.net", "user_lang", "en")] LINK_PATTERN = r'(?P<url>/download/redirect/[^"\']+)' - LIMIT_WAIT_PATTERN = r"<div id='timeout'>(\d+)<" + LIMIT_WAIT_PATTERN = r'<div id=\'timeout\'>(\d+)<' CAPTCHA_URL_PATTERN = r'<img alt="Captcha" src="(.+?)"' diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py index 03dad69dd..280f1d910 100644 --- a/module/plugins/hoster/TwoSharedCom.py +++ b/module/plugins/hoster/TwoSharedCom.py @@ -21,7 +21,7 @@ class TwoSharedCom(SimpleHoster): FILE_SIZE_PATTERN = r'<span class="dtitle">File size:</span>\s*(?P<S>[\d.,]+) (?P<U>\w+)' OFFLINE_PATTERN = r'The file link that you requested is not valid\.|This file was deleted\.' - LINK_PATTERN = r"window.location ='([^']+)';" + LINK_PATTERN = r'window.location =\'(.+?)\';' def setup(self): diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py index 6dc9b4a29..dae9a8eae 100644 --- a/module/plugins/hoster/XHamsterCom.py +++ b/module/plugins/hoster/XHamsterCom.py @@ -98,16 +98,16 @@ class XHamsterCom(Hoster): if not self.html: self.download_html() - pattern = r"<title>(.*?) - xHamster\.com</title>" + pattern = r'<title>(.*?) - xHamster\.com</title>' name = re.search(pattern, self.html) if name is None: - pattern = r"<h1 >(.*)</h1>" + pattern = r'<h1 >(.*)</h1>' name = re.search(pattern, self.html) if name is None: - pattern = r"http://[www.]+xhamster\.com/movies/.*/(.*?)\.html?" + pattern = r'http://[www.]+xhamster\.com/movies/.*/(.*?)\.html?' name = re.match(file_name_pattern, self.pyfile.url) if name is None: - pattern = r"<div id=\"element_str_id\" style=\"display:none;\">(.*)</div>" + pattern = r'<div id="element_str_id" style="display:none;">(.*)</div>' name = re.search(pattern, self.html) if name is None: return "Unknown" diff --git a/module/plugins/hoster/YibaishiwuCom.py b/module/plugins/hoster/YibaishiwuCom.py index bbf6e7bbe..803c7d1c3 100644 --- a/module/plugins/hoster/YibaishiwuCom.py +++ b/module/plugins/hoster/YibaishiwuCom.py @@ -18,8 +18,8 @@ class YibaishiwuCom(SimpleHoster): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - FILE_NAME_PATTERN = r"file_name: '(?P<N>[^']+)'" - FILE_SIZE_PATTERN = r"file_size: '(?P<S>[^']+)'" + FILE_NAME_PATTERN = r'file_name: \'(?P<N>.+?)\'' + FILE_SIZE_PATTERN = r'file_size: \'(?P<S>.+?)\'' OFFLINE_PATTERN = ur'<h3><i style="color:red;">哎呀!提取码不存在!不妨搜搜看吧!</i></h3>' LINK_PATTERN = r'(/\?ct=(pickcode|download)[^"\']+)' diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py index 692c63286..37788b9f7 100644 --- a/module/plugins/hoster/YoupornCom.py +++ b/module/plugins/hoster/YoupornCom.py @@ -42,7 +42,7 @@ class YoupornCom(Hoster): if not self.html: self.download_html() - file_name_pattern = r"<title>(.*) - Free Porn Videos - YouPorn</title>" + file_name_pattern = r'<title>(.+) - ' return re.search(file_name_pattern, self.html).group(1).replace("&", "&").replace("/", "") + '.flv' def file_exists(self): diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index 9d8fd85f2..db4ed41a4 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -59,8 +59,8 @@ class ReCaptcha(CaptchaService): __authors__ = [("pyLoad Team", "admin@pyload.org")] - KEY_PATTERN = r"https?://(?:www\.)?google\.com/recaptcha/api/challenge\?k=(?P<KEY>\w+)" - KEY_AJAX_PATTERN = r"Recaptcha\.create\s*\(\s*[\"'](?P<KEY>\w+)" + KEY_PATTERN = r'https?://(?:www\.)?google\.com/recaptcha/api/challenge\?k=(?P<KEY>\w+)' + KEY_AJAX_PATTERN = r'Recaptcha\.create\s*\(\s*["\'](?P<KEY>\w+)' def detect_key(self, html=None): diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py index 38a93c6af..4ef43bc31 100644 --- a/module/plugins/internal/MultiHoster.py +++ b/module/plugins/internal/MultiHoster.py @@ -152,9 +152,9 @@ class MultiHoster(Hook): self.logDebug("New Hosters", ", ".join(sorted(self.new_supported))) # create new regexp - regexp = r".*(%s).*" % "|".join([x.replace(".", "\\.") for x in self.new_supported]) + regexp = r'.*(%s).*' % "|".join([x.replace(".", "\\.") for x in self.new_supported]) if hasattr(klass, "__pattern__") and isinstance(klass.__pattern__, basestring) and '://' in klass.__pattern__: - regexp = r"%s|%s" % (klass.__pattern__, regexp) + regexp = r'%s|%s' % (klass.__pattern__, regexp) self.logDebug("Regexp", regexp) |