diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-05 16:54:20 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-05 16:54:20 +0200 |
commit | 93592862b520a862c01f80c019e5c4bc43746c19 (patch) | |
tree | 1cb7f4d13308fbdac0d8bb725c0383a6ef3ebe58 /module/plugins | |
parent | [SimpleCrypter] Better inline docs + support for offline & temp.offline check (diff) | |
download | pyload-93592862b520a862c01f80c019e5c4bc43746c19.tar.xz |
[SimpleHoster] Better inline docs + changed "FILE_OFFLINE_PATTERN" to "OFFLINE_PATTERN"
Diffstat (limited to 'module/plugins')
74 files changed, 102 insertions, 92 deletions
diff --git a/module/plugins/hoster/BayfilesCom.py b/module/plugins/hoster/BayfilesCom.py index b080eb386..720603c4d 100644 --- a/module/plugins/hoster/BayfilesCom.py +++ b/module/plugins/hoster/BayfilesCom.py @@ -34,7 +34,7 @@ class BayfilesCom(SimpleHoster): __author_mail__ = ("zoidberg@mujmail.cz", "vuolter@gmail.com") FILE_INFO_PATTERN = r'<p title="(?P<N>[^"]+)">[^<]*<strong>(?P<S>[0-9., ]+)(?P<U>[kKMG])i?B</strong></p>' - FILE_OFFLINE_PATTERN = r'(<p>The requested file could not be found.</p>|<title>404 Not Found</title>)' + OFFLINE_PATTERN = r'(<p>The requested file could not be found.</p>|<title>404 Not Found</title>)' WAIT_PATTERN = r'>Your IP [0-9.]* has recently downloaded a file\. Upgrade to premium or wait (\d+) minutes\.<' VARS_PATTERN = r'var vfid = (\d+);\s*var delay = (\d+);' diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index 55f3f33b9..ca2ad5243 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -32,7 +32,7 @@ class BezvadataCz(SimpleHoster): FILE_NAME_PATTERN = r'<p><b>Soubor: (?P<N>[^<]+)</b></p>' FILE_SIZE_PATTERN = r'<li><strong>Velikost:</strong> (?P<S>[^<]+)</li>' - FILE_OFFLINE_PATTERN = r'<title>BezvaData \| Soubor nenalezen</title>' + OFFLINE_PATTERN = r'<title>BezvaData \| Soubor nenalezen</title>' def setup(self): self.multiDL = self.resumeDownload = True diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index c1a0d50f8..3b0fc5137 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -18,7 +18,7 @@ class BitshareCom(SimpleHoster): __author_mail__ = ("", "fragonib[AT]yahoo[DOT]es") HOSTER_DOMAIN = "bitshare.com" - FILE_OFFLINE_PATTERN = r'(>We are sorry, but the requested file was not found in our database|>Error - File not available<|The file was deleted either by the uploader, inactivity or due to copyright claim)' + OFFLINE_PATTERN = r'(>We are sorry, but the requested file was not found in our database|>Error - File not available<|The file was deleted either by the uploader, inactivity or due to copyright claim)' FILE_INFO_PATTERN = r'Downloading (?P<N>.+) - (?P<S>[\d.]+) (?P<U>\w+)</h1>' FILE_AJAXID_PATTERN = r'var ajaxdl = "(.*?)";' CAPTCHA_KEY_PATTERN = r"http://api\.recaptcha\.net/challenge\?k=(.*?) " @@ -44,7 +44,7 @@ class BitshareCom(SimpleHoster): self.html = self.load(pyfile.url, ref=False, decode=True) # Check offline - if re.search(self.FILE_OFFLINE_PATTERN, self.html): + if re.search(self.OFFLINE_PATTERN, self.html): self.offline() # Check Traffic used up diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index efaf8e5f7..fa84b7732 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -15,7 +15,7 @@ class CatShareNet(SimpleHoster): __author_mail__ = "z00nx0@gmail.com" FILE_INFO_PATTERN = r'<h3 class="pull-left"[^>]+>(?P<N>.*)</h3>\s+<h3 class="pull-right"[^>]+>(?P<S>.*)</h3>' - FILE_OFFLINE_PATTERN = r'Podany plik zosta' + OFFLINE_PATTERN = r'Podany plik zosta' SECONDS_PATTERN = 'var\s+count\s+=\s+(\d+);' RECAPTCHA_KEY = "6Lfln9kSAAAAANZ9JtHSOgxUPB9qfDFeLUI_QMEy" diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index 3cd2be59d..3d7360769 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -17,7 +17,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>' - FILE_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" DOWNLOAD_URL_PATTERN = r"window.location ='([^']+)';" CAPTCHA_URL_PATTERN = re.compile(r"u='(/file_contents/captcha/\w+)';\s*w='(\d+)';") CAPTCHA_KEY_PATTERN = re.compile(r'Recaptcha.create\("([^"]+)"') diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index a462deaff..5fab87157 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -36,7 +36,7 @@ class CzshareCom(SimpleHoster): FILE_NAME_PATTERN = r'<div class="tab" id="parameters">\s*<p>\s*Cel. n.zev: <a href=[^>]*>(?P<N>[^<]+)</a>' FILE_SIZE_PATTERN = r'<div class="tab" id="category">(?:\s*<p>[^\n]*</p>)*\s*Velikost:\s*(?P<S>[0-9., ]+)(?P<U>[kKMG])i?B\s*</div>' - FILE_OFFLINE_PATTERN = r'<div class="header clearfix">\s*<h2 class="red">' + OFFLINE_PATTERN = r'<div class="header clearfix">\s*<h2 class="red">' FILE_SIZE_REPLACEMENTS = [(' ', '')] FILE_URL_REPLACEMENTS = [(r'http://[^/]*/download.php\?.*?id=(\w+).*', r'http://sdilej.cz/\1/x/')] diff --git a/module/plugins/hoster/DataHu.py b/module/plugins/hoster/DataHu.py index 0c872b419..74333d743 100644 --- a/module/plugins/hoster/DataHu.py +++ b/module/plugins/hoster/DataHu.py @@ -32,7 +32,7 @@ class DataHu(SimpleHoster): __author_mail__ = "l.stickell@yahoo.it" FILE_INFO_PATTERN = ur'<title>(?P<N>.*) \((?P<S>[^)]+)\) let\xf6lt\xe9se</title>' - FILE_OFFLINE_PATTERN = ur'Az adott f\xe1jl nem l\xe9tezik' + OFFLINE_PATTERN = ur'Az adott f\xe1jl nem l\xe9tezik' DIRECT_LINK_PATTERN = r'<div class="download_box_button"><a href="([^"]+)">' def handleFree(self): diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py index 291dcaf55..a5ff05f39 100644 --- a/module/plugins/hoster/DataportCz.py +++ b/module/plugins/hoster/DataportCz.py @@ -31,7 +31,7 @@ class DataportCz(SimpleHoster): FILE_NAME_PATTERN = r'<span itemprop="name">(?P<N>[^<]+)</span>' FILE_SIZE_PATTERN = r'<td class="fil">Velikost</td>\s*<td>(?P<S>[^<]+)</td>' - FILE_OFFLINE_PATTERN = r'<h2>Soubor nebyl nalezen</h2>' + OFFLINE_PATTERN = r'<h2>Soubor nebyl nalezen</h2>' FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.dataport.cz/file/\1')] CAPTCHA_URL_PATTERN = r'<section id="captcha_bg">\s*<img src="(.*?)"' diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py index 223138592..73f2f224f 100644 --- a/module/plugins/hoster/DateiTo.py +++ b/module/plugins/hoster/DateiTo.py @@ -33,7 +33,7 @@ class DateiTo(SimpleHoster): FILE_NAME_PATTERN = r'Dateiname:</td>\s*<td colspan="2"><strong>(?P<N>.*?)</' FILE_SIZE_PATTERN = r'Dateigröße:</td>\s*<td colspan="2">(?P<S>.*?)</' - FILE_OFFLINE_PATTERN = r'>Datei wurde nicht gefunden<|>Bitte wähle deine Datei aus... <' + OFFLINE_PATTERN = r'>Datei wurde nicht gefunden<|>Bitte wähle deine Datei aus... <' PARALELL_PATTERN = r'>Du lädst bereits eine Datei herunter<' WAIT_PATTERN = r'countdown\({seconds: (\d+)' diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index 11b4f4112..7b9713861 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -17,7 +17,7 @@ class DepositfilesCom(SimpleHoster): FILE_SIZE_PATTERN = r': <b>(?P<S>[0-9.]+) (?P<U>[kKMG])i?B</b>' FILE_NAME_PATTERN = r'<script type="text/javascript">eval\( unescape\(\'(?P<N>.*?)\'' - FILE_OFFLINE_PATTERN = r'<span class="html_download_api-not_exists"></span>' + OFFLINE_PATTERN = r'<span class="html_download_api-not_exists"></span>' FILE_URL_REPLACEMENTS = [(r"\.com(/.*?)?/files", ".com/en/files"), (r"\.html$", "")] FILE_NAME_REPLACEMENTS = [(r'\%u([0-9A-Fa-f]{4})', lambda m: unichr(int(m.group(1), 16))), (r'.*<b title="(?P<N>[^"]+).*', "\g<N>")] @@ -27,7 +27,7 @@ class DepositfilesCom(SimpleHoster): def handleFree(self): self.html = self.load(self.pyfile.url, post={"gateway_result": "1"}, cookies=True) - if re.search(self.FILE_OFFLINE_PATTERN, self.html): + if re.search(self.OFFLINE_PATTERN, self.html): self.offline() if re.search(r'File is checked, please try again in a minute.', self.html) is not None: diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py index 998dcd606..566c71932 100644 --- a/module/plugins/hoster/DlFreeFr.py +++ b/module/plugins/hoster/DlFreeFr.py @@ -114,7 +114,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.]+[KMG])o" - FILE_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é" #FILE_URL_PATTERN = r'href="(?P<url>http://.*?)">Télécharger ce fichier' def setup(self): diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py index 0ea9b186f..43f823404 100644 --- a/module/plugins/hoster/EasybytezCom.py +++ b/module/plugins/hoster/EasybytezCom.py @@ -32,7 +32,7 @@ class EasybytezCom(XFileSharingPro): HOSTER_NAME = "easybytez.com" FILE_INFO_PATTERN = r'<span class="name">(?P<N>.+)</span><br>\s*<span class="size">(?P<S>[^<]+)</span>' - FILE_OFFLINE_PATTERN = r'<h1>File not available</h1>' + OFFLINE_PATTERN = r'<h1>File not available</h1>' DIRECT_LINK_PATTERN = r'(http://(\w+\.(easyload|easybytez|zingload)\.(com|to)|\d+\.\d+\.\d+\.\d+)/files/\d+/\w+/[^"<]+)' OVR_DOWNLOAD_LINK_PATTERN = r'<h2>Download Link</h2>\s*<textarea[^>]*>([^<]+)' diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py index f2d0fa206..e01c1130f 100644 --- a/module/plugins/hoster/EdiskCz.py +++ b/module/plugins/hoster/EdiskCz.py @@ -34,7 +34,7 @@ class EdiskCz(SimpleHoster): FILE_INFO_PATTERN = r'<span class="fl" title="(?P<N>[^"]+)">\s*.*?\((?P<S>[0-9.]*) (?P<U>[kKMG])i?B\)</h1></span>' ACTION_PATTERN = r'/en/download/(\d+/.*\.html)' DLLINK_PATTERN = r'http://.*edisk.cz.*\.html' - FILE_OFFLINE_PATTERN = r'<h3>This file does not exist due to one of the following:</h3><ul><li>' + OFFLINE_PATTERN = r'<h3>This file does not exist due to one of the following:</h3><ul><li>' def setup(self): self.multiDL = False diff --git a/module/plugins/hoster/EgoFilesCom.py b/module/plugins/hoster/EgoFilesCom.py index 68a95b33a..000a89901 100644 --- a/module/plugins/hoster/EgoFilesCom.py +++ b/module/plugins/hoster/EgoFilesCom.py @@ -33,7 +33,7 @@ class EgoFilesCom(SimpleHoster): __author_mail__ = "l.stickell@yahoo.it" FILE_INFO_PATTERN = r'<div class="down-file">\s+(?P<N>[^\t]+)\s+<div class="file-properties">\s+(File size|Rozmiar): (?P<S>[\w.]+) (?P<U>\w+) \|' - FILE_OFFLINE_PATTERN = r'(File size|Rozmiar): 0 KB' + OFFLINE_PATTERN = r'(File size|Rozmiar): 0 KB' WAIT_TIME_PATTERN = r'For next free download you have to wait <strong>((?P<m>\d*)m)? ?((?P<s>\d+)s)?</strong>' DIRECT_LINK_PATTERN = r'<a href="(?P<link>[^"]+)">Download ></a>' RECAPTCHA_KEY = '6LeXatQSAAAAAHezcjXyWAni-4t302TeYe7_gfvX' diff --git a/module/plugins/hoster/EpicShareNet.py b/module/plugins/hoster/EpicShareNet.py index 65e9cb5c3..062c8186f 100644 --- a/module/plugins/hoster/EpicShareNet.py +++ b/module/plugins/hoster/EpicShareNet.py @@ -17,7 +17,7 @@ class EpicShareNet(XFileSharingPro): HOSTER_NAME = "epicshare.net" - FILE_OFFLINE_PATTERN = r'<b>File Not Found</b><br><br>' + OFFLINE_PATTERN = r'<b>File Not Found</b><br><br>' FILE_NAME_PATTERN = r'<b>Password:</b></div>\s*<h2>(?P<N>[^<]+)</h2>' diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index fa6342014..dcfddb367 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -31,7 +31,7 @@ class EuroshareEu(SimpleHoster): __author_mail__ = "zoidberg@mujmail.cz" FILE_INFO_PATTERN = r'<span style="float: left;"><strong>(?P<N>.+?)</strong> \((?P<S>.+?)\)</span>' - FILE_OFFLINE_PATTERN = ur'<h2>S.bor sa nena.iel</h2>|Požadovaná stránka neexistuje!' + OFFLINE_PATTERN = ur'<h2>S.bor sa nena.iel</h2>|Požadovaná stránka neexistuje!' FREE_URL_PATTERN = r'<a href="(/file/\d+/[^/]*/download/)"><div class="downloadButton"' ERR_PARDL_PATTERN = r'<h2>Prebieha s.ahovanie</h2>|<p>Naraz je z jednej IP adresy mo.n. s.ahova. iba jeden s.bor' diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py index 4dba81a8f..4396f08cb 100644 --- a/module/plugins/hoster/ExtabitCom.py +++ b/module/plugins/hoster/ExtabitCom.py @@ -35,7 +35,7 @@ class ExtabitCom(SimpleHoster): FILE_NAME_PATTERN = r'<th>File:</th>\s*<td class="col-fileinfo">\s*<div title="(?P<N>[^"]+)">' FILE_SIZE_PATTERN = r'<th>Size:</th>\s*<td class="col-fileinfo">(?P<S>[^<]+)</td>' - FILE_OFFLINE_PATTERN = r'>File not found<' + OFFLINE_PATTERN = r'>File not found<' TEMP_OFFLINE_PATTERN = r">(File is temporary unavailable|No download mirror)<" DOWNLOAD_LINK_PATTERN = r'[\'"](http://guest\d+\.extabit\.com/[a-z0-9]+/.*?)[\'"]' diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py index c7841a237..996dea2f5 100644 --- a/module/plugins/hoster/FastshareCz.py +++ b/module/plugins/hoster/FastshareCz.py @@ -35,7 +35,7 @@ class FastshareCz(SimpleHoster): __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it", "vuolter@gmail.com") FILE_INFO_PATTERN = r'<h1 class="dwp">(?P<N>[^<]+)</h1>\s*<div class="fileinfo">\s*Size\s*: (?P<S>\d+) (?P<U>\w+),' - FILE_OFFLINE_PATTERN = '>(The file has been deleted|Requested page not found)' + OFFLINE_PATTERN = '>(The file has been deleted|Requested page not found)' FILE_URL_REPLACEMENTS = [("#.*", "")] SH_COOKIES = [(".fastshare.cz", "lang", "en")] diff --git a/module/plugins/hoster/FileStoreTo.py b/module/plugins/hoster/FileStoreTo.py index 5a73fb9ef..bd9ec4540 100644 --- a/module/plugins/hoster/FileStoreTo.py +++ b/module/plugins/hoster/FileStoreTo.py @@ -32,7 +32,7 @@ class FileStoreTo(SimpleHoster): __author_mail__ = ("vuolter@gmail.com", "l.stickell@yahoo.it") FILE_INFO_PATTERN = r'File: <span[^>]*>(?P<N>.+)</span><br />Size: (?P<S>[\d,.]+) (?P<U>\w+)' - FILE_OFFLINE_PATTERN = r'>Download-Datei wurde nicht gefunden<' + OFFLINE_PATTERN = r'>Download-Datei wurde nicht gefunden<' def setup(self): self.resumeDownload = self.multiDL = True diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py index 56eedf33a..4977742af 100644 --- a/module/plugins/hoster/FilecloudIo.py +++ b/module/plugins/hoster/FilecloudIo.py @@ -34,7 +34,7 @@ class FilecloudIo(SimpleHoster): FILE_SIZE_PATTERN = r'{var __ab1 = (?P<S>\d+);}' FILE_NAME_PATTERN = r'id="aliasSpan">(?P<N>.*?) <' - FILE_OFFLINE_PATTERN = r'l10n.(FILES__DOESNT_EXIST|REMOVED)' + OFFLINE_PATTERN = r'l10n.(FILES__DOESNT_EXIST|REMOVED)' TEMP_OFFLINE_PATTERN = r'l10n.FILES__WARNING' UKEY_PATTERN = r"'ukey'\s*:'(\w+)'," diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index ab0d3232f..d6a15b0ea 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -42,7 +42,7 @@ class FilefactoryCom(SimpleHoster): FILE_INFO_PATTERN = r'<div id="file_name"[^>]*>\s*<h2>(?P<N>[^<]+)</h2>\s*<div id="file_info">\s*(?P<S>[\d.]+) (?P<U>\w+) uploaded' DIRECT_LINK_PATTERN = r'<a href="(https?://[^"]+)"[^>]*><i[^>]*></i> Download with FileFactory Premium</a>' - FILE_OFFLINE_PATTERN = r'<h2>File Removed</h2>|This file is no longer available' + OFFLINE_PATTERN = r'<h2>File Removed</h2>|This file is no longer available' PREMIUM_ONLY_PATTERN = r'>Premium Account Required<' SH_COOKIES = [('.filefactory.com', 'locale', 'en_US.utf8')] diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py index d173a0df4..000dc1de7 100644 --- a/module/plugins/hoster/FilepostCom.py +++ b/module/plugins/hoster/FilepostCom.py @@ -41,7 +41,7 @@ class FilepostCom(SimpleHoster): FILE_INFO_PATTERN = r'<input type="text" id="url" value=\'<a href[^>]*>(?P<N>[^>]+?) - (?P<S>[0-9\.]+ [kKMG]i?B)</a>\' class="inp_text"/>' #FILE_INFO_PATTERN = r'<h1>(?P<N>[^<]+)</h1>\s*<div class="ul">\s*<ul>\s*<li><span>Size:</span> (?P<S>[0-9.]+) (?P<U>[kKMG])i?B</li>' - FILE_OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File. </div>|<div class="file_info file_info_deleted">' + OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File. </div>|<div class="file_info file_info_deleted">' RECAPTCHA_KEY_PATTERN = r"Captcha.init\({\s*key:\s*'([^']+)'" FLP_TOKEN_PATTERN = r"set_store_options\({token: '([^']+)'" PREMIUM_ONLY_PATTERN = r'members only. Please upgrade to premium|a premium membership is required to download this file' diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index d39666922..9a2bbafbf 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -36,7 +36,7 @@ class FilerNet(SimpleHoster): __author_mail__ = "l.stickell@yahoo.it" FILE_INFO_PATTERN = r'<h1 class="page-header">Free Download (?P<N>\S+) <small>(?P<S>[\w.]+) (?P<U>\w+)</small></h1>' - FILE_OFFLINE_PATTERN = r'Nicht gefunden' + OFFLINE_PATTERN = r'Nicht gefunden' RECAPTCHA_KEY = '6LcFctISAAAAAAgaeHgyqhNecGJJRnxV1m_vAz3V' DIRECT_LINK_PATTERN = r'href="([^"]+)">Get download</a>' diff --git a/module/plugins/hoster/FilerioCom.py b/module/plugins/hoster/FilerioCom.py index a0c67509f..1c6c375f6 100644 --- a/module/plugins/hoster/FilerioCom.py +++ b/module/plugins/hoster/FilerioCom.py @@ -14,7 +14,7 @@ class FilerioCom(XFileSharingPro): HOSTER_NAME = "filerio.in" - FILE_OFFLINE_PATTERN = '<b>"File Not Found"</b>|File has been removed due to Copyright Claim' + OFFLINE_PATTERN = '<b>"File Not Found"</b>|File has been removed due to Copyright Claim' FILE_URL_REPLACEMENTS = [(r'http://.*?/', 'http://filerio.in/')] def setup(self): diff --git a/module/plugins/hoster/FiredriveCom.py b/module/plugins/hoster/FiredriveCom.py index 9c150bc11..5c6b4ea0c 100644 --- a/module/plugins/hoster/FiredriveCom.py +++ b/module/plugins/hoster/FiredriveCom.py @@ -30,7 +30,7 @@ class FiredriveCom(SimpleHoster): FILE_NAME_PATTERN = r'<b>Name:</b> (?P<N>.+) <br>' FILE_SIZE_PATTERN = r'<b>Size:</b> (?P<S>[\d.]+) (?P<U>[a-zA-Z]+) <br>' - FILE_OFFLINE_PATTERN = r'class="sad_face_image"' + OFFLINE_PATTERN = r'class="sad_face_image"' FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.firedrive.com/file/\g<ID>')] diff --git a/module/plugins/hoster/FourSharedCom.py b/module/plugins/hoster/FourSharedCom.py index 9c7752fe1..9b8b3b1f0 100644 --- a/module/plugins/hoster/FourSharedCom.py +++ b/module/plugins/hoster/FourSharedCom.py @@ -16,7 +16,7 @@ class FourSharedCom(SimpleHoster): FILE_NAME_PATTERN = r'<meta name="title" content="(?P<N>.+?)"' FILE_SIZE_PATTERN = '<span title="Size: (?P<S>[0-9,.]+) (?P<U>[kKMG])i?B">' - FILE_OFFLINE_PATTERN = 'The file link that you requested is not valid\.|This file was deleted.' + OFFLINE_PATTERN = 'The file link that you requested is not valid\.|This file was deleted.' FILE_NAME_REPLACEMENTS = [(r"&#(\d+).", lambda m: unichr(int(m.group(1))))] FILE_SIZE_REPLACEMENTS = [(",", "")] diff --git a/module/plugins/hoster/FreevideoCz.py b/module/plugins/hoster/FreevideoCz.py index eebb43b48..21948a83d 100644 --- a/module/plugins/hoster/FreevideoCz.py +++ b/module/plugins/hoster/FreevideoCz.py @@ -28,7 +28,7 @@ def getInfo(urls): for url in urls: html = getURL(url) - if re.search(FreevideoCz.FILE_OFFLINE_PATTERN, html): + if re.search(FreevideoCz.OFFLINE_PATTERN, html): # File offline result.append((url, 0, 1, url)) else: @@ -46,7 +46,7 @@ class FreevideoCz(Hoster): __author_mail__ = "zoidberg@mujmail.cz" URL_PATTERN = r'clip: {\s*url: "([^"]+)"' - FILE_OFFLINE_PATTERN = r'<h2 class="red-corner-full">Str.nka nebyla nalezena</h2>' + OFFLINE_PATTERN = r'<h2 class="red-corner-full">Str.nka nebyla nalezena</h2>' def setup(self): self.multiDL = self.resumeDownload = True @@ -55,7 +55,7 @@ class FreevideoCz(Hoster): self.html = self.load(pyfile.url, decode=True) - if re.search(self.FILE_OFFLINE_PATTERN, self.html): + if re.search(self.OFFLINE_PATTERN, self.html): self.offline() found = re.search(self.URL_PATTERN, self.html) diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py index f9a9b6c16..63cc69161 100644 --- a/module/plugins/hoster/FshareVn.py +++ b/module/plugins/hoster/FshareVn.py @@ -33,7 +33,7 @@ class FshareVn(SimpleHoster): __author_mail__ = "zoidberg@mujmail.cz" FILE_INFO_PATTERN = r'<p>(?P<N>[^<]+)<\\/p>[\\trn\s]*<p>(?P<S>[0-9,.]+)\s*(?P<U>[kKMG])i?B<\\/p>' - FILE_OFFLINE_PATTERN = r'<div class=\\"f_left file_w\\"|<\\/p>\\t\\t\\t\\t\\r\\n\\t\\t<p><\\/p>\\t\\t\\r\\n\\t\\t<p>0 KB<\\/p>' + OFFLINE_PATTERN = r'<div class=\\"f_left file_w\\"|<\\/p>\\t\\t\\t\\t\\r\\n\\t\\t<p><\\/p>\\t\\t\\r\\n\\t\\t<p>0 KB<\\/p>' FILE_NAME_REPLACEMENTS = [("(.*)", doubleDecode)] DOWNLOAD_URL_PATTERN = r'action="(http://download.*?)[#"]' VIP_URL_PATTERN = r'<form action="([^>]+)" method="get" name="frm_download">' diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py index 1282c996d..f34af0413 100644 --- a/module/plugins/hoster/GigapetaCom.py +++ b/module/plugins/hoster/GigapetaCom.py @@ -36,7 +36,7 @@ class GigapetaCom(SimpleHoster): SH_COOKIES = [("http://gigapeta.com", "lang", "us")] FILE_NAME_PATTERN = r'<img src=".*" alt="file" />-->\s*(?P<N>.*?)\s*</td>' FILE_SIZE_PATTERN = r'<th>\s*Size\s*</th>\s*<td>\s*(?P<S>.*?)\s*</td>' - FILE_OFFLINE_PATTERN = r'<div id="page_error">' + OFFLINE_PATTERN = r'<div id="page_error">' def handleFree(self): captcha_key = str(randint(1, 100000000)) diff --git a/module/plugins/hoster/GooIm.py b/module/plugins/hoster/GooIm.py index 1f77b7fe0..9f06e5ca0 100644 --- a/module/plugins/hoster/GooIm.py +++ b/module/plugins/hoster/GooIm.py @@ -29,7 +29,7 @@ class GooIm(SimpleHoster): __author_mail__ = "l.stickell@yahoo.it" FILE_NAME_PATTERN = r'<h3>Filename: (?P<N>.+)</h3>' - FILE_OFFLINE_PATTERN = r'The file you requested was not found' + OFFLINE_PATTERN = r'The file you requested was not found' def setup(self): self.chunkLimit = -1 diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py index 91e51e314..c407c21f2 100644 --- a/module/plugins/hoster/HellshareCz.py +++ b/module/plugins/hoster/HellshareCz.py @@ -32,7 +32,7 @@ class HellshareCz(SimpleHoster): FILE_NAME_PATTERN = r'<h1 id="filename"[^>]*>(?P<N>[^<]+)</h1>' FILE_SIZE_PATTERN = r'<strong id="FileSize_master">(?P<S>[0-9.]*) (?P<U>[kKMG])i?B</strong>' - FILE_OFFLINE_PATTERN = r'<h1>File not found.</h1>' + OFFLINE_PATTERN = r'<h1>File not found.</h1>' SHOW_WINDOW_PATTERN = r'<a href="([^?]+/(\d+)/\?do=(fileDownloadButton|relatedFileDownloadButton-\2)-showDownloadWindow)"' def setup(self): diff --git a/module/plugins/hoster/IFileWs.py b/module/plugins/hoster/IFileWs.py index 5b0adaa97..6f7fe8388 100644 --- a/module/plugins/hoster/IFileWs.py +++ b/module/plugins/hoster/IFileWs.py @@ -15,7 +15,7 @@ class IFileWs(XFileSharingPro): HOSTER_NAME = "ifile.ws" FILE_INFO_PATTERN = '<h1\s+style="display:inline;">(?P<N>[^<]+)</h1>\s+\[(?P<S>[^]]+)\]' - FILE_OFFLINE_PATTERN = 'File Not Found|The file was removed by administrator' + OFFLINE_PATTERN = 'File Not Found|The file was removed by administrator' LONG_WAIT_PATTERN = "(?P<M>\d(?=\s+minutes)).*(?P<S>\d+(?=\s+seconds))" diff --git a/module/plugins/hoster/IfileIt.py b/module/plugins/hoster/IfileIt.py index 6c754624b..64dac7d13 100644 --- a/module/plugins/hoster/IfileIt.py +++ b/module/plugins/hoster/IfileIt.py @@ -37,7 +37,7 @@ class IfileIt(SimpleHoster): DOWNLOAD_LINK_PATTERN = r'</span> If it doesn\'t, <a target="_blank" href="([^"]+)">' RECAPTCHA_KEY_PATTERN = r"var __recaptcha_public\s*=\s*'([^']+)';" FILE_INFO_PATTERN = r'<span style="cursor: default;[^>]*>\s*(?P<N>.*?)\s* \s*<strong>\s*(?P<S>[0-9.]+)\s*(?P<U>[kKMG])i?B\s*</strong>\s*</span>' - FILE_OFFLINE_PATTERN = r'<span style="cursor: default;[^>]*>\s* \s*<strong>\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>' def handleFree(self): diff --git a/module/plugins/hoster/IfolderRu.py b/module/plugins/hoster/IfolderRu.py index 7c5fede72..ca38ca418 100644 --- a/module/plugins/hoster/IfolderRu.py +++ b/module/plugins/hoster/IfolderRu.py @@ -33,7 +33,7 @@ class IfolderRu(SimpleHoster): FILE_SIZE_REPLACEMENTS = [(u'Кб', 'KB'), (u'Мб', 'MB'), (u'Гб', 'GB')] FILE_NAME_PATTERN = ur'(?:<div><span>)?Название:(?:</span>)? <b>(?P<N>[^<]+)</b><(?:/div|br)>' FILE_SIZE_PATTERN = ur'(?:<div><span>)?Размер:(?:</span>)? <b>(?P<S>[^<]+)</b><(?:/div|br)>' - FILE_OFFLINE_PATTERN = ur'<p>Файл номер <b>[^<]*</b> (не найден|удален) !!!</p>' + OFFLINE_PATTERN = ur'<p>Файл номер <b>[^<]*</b> (не найден|удален) !!!</p>' 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 = "([^"]+)";\}' diff --git a/module/plugins/hoster/JumbofilesCom.py b/module/plugins/hoster/JumbofilesCom.py index cdeffff34..55d179b4e 100644 --- a/module/plugins/hoster/JumbofilesCom.py +++ b/module/plugins/hoster/JumbofilesCom.py @@ -14,7 +14,7 @@ class JumbofilesCom(SimpleHoster): __author_mail__ = "soilfiction@gmail.com" FILE_INFO_PATTERN = '<TR><TD>(?P<N>[^<]+?)\s*<small>\((?P<S>[\d.]+)\s*(?P<U>[KMG][bB])\)</small></TD></TR>' - FILE_OFFLINE_PATTERN = 'Not Found or Deleted / Disabled due to inactivity or DMCA' + OFFLINE_PATTERN = 'Not Found or Deleted / Disabled due to inactivity or DMCA' DIRECT_LINK_PATTERN = '<meta http-equiv="refresh" content="10;url=(.+)">' def setup(self): diff --git a/module/plugins/hoster/Keep2shareCC.py b/module/plugins/hoster/Keep2shareCC.py index a7f1efdb8..e9f294087 100644 --- a/module/plugins/hoster/Keep2shareCC.py +++ b/module/plugins/hoster/Keep2shareCC.py @@ -35,7 +35,7 @@ class Keep2shareCC(SimpleHoster): FILE_NAME_PATTERN = r'File: <span>(?P<N>.+)</span>' FILE_SIZE_PATTERN = r'Size: (?P<S>[^<]+)</div>' - FILE_OFFLINE_PATTERN = r'File not found or deleted|Sorry, this file is blocked or deleted|Error 404' + OFFLINE_PATTERN = r'File not found or deleted|Sorry, this file is blocked or deleted|Error 404' DIRECT_LINK_PATTERN = r'To download this file with slow speed, use <a href="([^"]+)">this link</a>' WAIT_PATTERN = r'Please wait ([\d:]+) to download this file' diff --git a/module/plugins/hoster/LemUploadsCom.py b/module/plugins/hoster/LemUploadsCom.py index 426a757b3..0d4facea2 100644 --- a/module/plugins/hoster/LemUploadsCom.py +++ b/module/plugins/hoster/LemUploadsCom.py @@ -17,7 +17,7 @@ class LemUploadsCom(XFileSharingPro): HOSTER_NAME = "lemuploads.com" - FILE_OFFLINE_PATTERN = r'<b>File Not Found</b><br><br>' + OFFLINE_PATTERN = r'<b>File Not Found</b><br><br>' FILE_NAME_PATTERN = r'<b>Password:</b></div>\s*<h2>(?P<N>[^<]+)</h2>' diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index e52346274..5cad8b580 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -35,7 +35,7 @@ class LoadTo(SimpleHoster): FILE_INFO_PATTERN = r'<a [^>]+>(?P<N>.+)</a></h3>\s*Size: (?P<S>\d+) (?P<U>[kKmMgG]?i?[bB])' URL_PATTERN = r'<form method="post" action="(.+?)"' - FILE_OFFLINE_PATTERN = r'Can\'t find file. Please check URL.' + OFFLINE_PATTERN = r'Can\'t find file. Please check URL.' WAIT_PATTERN = r'type="submit" value="Download \((\d+)\)"' RECAPTCHA_PATTERN = r'http://www.google.com/recaptcha/api/challenge' RECAPTCHA_KEY = "6Lc34eISAAAAAKNbPVyxBgNriTjPRmF-FA1oxApG" @@ -49,7 +49,7 @@ class LoadTo(SimpleHoster): self.getFileInfo() # Check if File is online - if re.search(self.FILE_OFFLINE_PATTERN, self.html): + if re.search(self.OFFLINE_PATTERN, self.html): self.offline() # Search for Download URL diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py index 75520a6cf..b5327d175 100644 --- a/module/plugins/hoster/LuckyShareNet.py +++ b/module/plugins/hoster/LuckyShareNet.py @@ -17,7 +17,7 @@ class LuckyShareNet(SimpleHoster): __author_mail__ = "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_OFFLINE_PATTERN = 'There is no such file available' + OFFLINE_PATTERN = 'There is no such file available' RECAPTCHA_KEY = '6LdivsgSAAAAANWh-d7rPE1mus4yVWuSQIJKIYNw' def parseJson(self, rep): diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py index 52e38aada..60c7d7bb5 100644 --- a/module/plugins/hoster/MediafireCom.py +++ b/module/plugins/hoster/MediafireCom.py @@ -78,7 +78,7 @@ class MediafireCom(SimpleHoster): 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_OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File. </div>' + OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File. </div>' def setup(self): self.multiDL = False diff --git a/module/plugins/hoster/MegaFilesSe.py b/module/plugins/hoster/MegaFilesSe.py index 43601bdb1..e4895bc87 100644 --- a/module/plugins/hoster/MegaFilesSe.py +++ b/module/plugins/hoster/MegaFilesSe.py @@ -14,7 +14,7 @@ class MegaFilesSe(XFileSharingPro): HOSTER_NAME = "megafiles.se" - FILE_OFFLINE_PATTERN = r'<b><font[^>]*>File Not Found</font></b><br><br>' + OFFLINE_PATTERN = r'<b><font[^>]*>File Not Found</font></b><br><br>' FILE_NAME_PATTERN = r'<div[^>]+>\s*<b>(?P<N>[^<]+)</b>\s*</div>' diff --git a/module/plugins/hoster/MegasharesCom.py b/module/plugins/hoster/MegasharesCom.py index b73b4943c..5168b177d 100644 --- a/module/plugins/hoster/MegasharesCom.py +++ b/module/plugins/hoster/MegasharesCom.py @@ -40,7 +40,7 @@ class MegasharesCom(SimpleHoster): REACTIVATE_PASSPORT_PATTERN = r'<input[^>]*id="passport_num" value="(\w+)" />' REQUEST_URI_PATTERN = r'var request_uri = "([^"]+)";' NO_SLOTS_PATTERN = r'<dd class="red">All download slots for this link are currently filled' - FILE_OFFLINE_PATTERN = r'<dd class="red">(Invalid Link Request|Link has been deleted)' + OFFLINE_PATTERN = r'<dd class="red">(Invalid Link Request|Link has been deleted)' def setup(self): self.resumeDownload = True diff --git a/module/plugins/hoster/MovReelCom.py b/module/plugins/hoster/MovReelCom.py index 2dedcf13d..5d7bbe71b 100644 --- a/module/plugins/hoster/MovReelCom.py +++ b/module/plugins/hoster/MovReelCom.py @@ -19,7 +19,7 @@ class MovReelCom(XFileSharingPro): #FILE_NAME_PATTERN = r'<b>Filename:</b>(?P<N>.*?)<br>' #FILE_SIZE_PATTERN = r'<b>Size:</b>(?P<S>.*?)<br>' FILE_INFO_PATTERN = r'<h3>(?P<N>.+?) <small><sup>(?P<S>[\d.]+) (?P<U>..)</sup> </small></h3>' - FILE_OFFLINE_PATTERN = r'<b>File Not Found</b><br><br>' + OFFLINE_PATTERN = r'<b>File Not Found</b><br><br>' DIRECT_LINK_PATTERN = r'<a href="(http://[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/.*)">Download Link</a>' #OVR_DOWNLOAD_LINK_PATTERN = "var file_link = '(.*)';" diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py index e38bd048f..8146144fa 100644 --- a/module/plugins/hoster/MultishareCz.py +++ b/module/plugins/hoster/MultishareCz.py @@ -32,7 +32,7 @@ class MultishareCz(SimpleHoster): __author_mail__ = "zoidberg@mujmail.cz" FILE_INFO_PATTERN = ur'(?:<li>Název|Soubor): <strong>(?P<N>[^<]+)</strong><(?:/li><li|br)>Velikost: <strong>(?P<S>[^<]+)</strong>' - FILE_OFFLINE_PATTERN = ur'<h1>Stáhnout soubor</h1><p><strong>Požadovaný soubor neexistuje.</strong></p>' + OFFLINE_PATTERN = ur'<h1>Stáhnout soubor</h1><p><strong>Požadovaný soubor neexistuje.</strong></p>' FILE_SIZE_REPLACEMENTS = [(' ', '')] def process(self, pyfile): diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index 6f08e6207..d47221444 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -33,7 +33,7 @@ class NarodRu(SimpleHoster): FILE_NAME_PATTERN = r'<dt class="name">(?:<[^<]*>)*(?P<N>[^<]+)</dt>' FILE_SIZE_PATTERN = r'<dd class="size">(?P<S>\d[^<]*)</dd>' - FILE_OFFLINE_PATTERN = r'<title>404</title>|Файл удален с сервиса|Закончился срок хранения файла\.' + OFFLINE_PATTERN = r'<title>404</title>|Файл удален с сервиса|Закончился срок хранения файла\.' FILE_SIZE_REPLACEMENTS = [(u'КБ', 'KB'), (u'МБ', 'MB'), (u'ГБ', 'GB')] FILE_URL_REPLACEMENTS = [("narod.yandex.ru/", "narod.ru/"), diff --git a/module/plugins/hoster/NowDownloadEu.py b/module/plugins/hoster/NowDownloadEu.py index cc1a10da0..4619c035d 100644 --- a/module/plugins/hoster/NowDownloadEu.py +++ b/module/plugins/hoster/NowDownloadEu.py @@ -32,7 +32,7 @@ class NowDownloadEu(SimpleHoster): __author_mail__ = ("soilfiction@gmail.com", "vuolter@gmail.com") FILE_INFO_PATTERN = r'Downloading</span> <br> (?P<N>.*) (?P<S>[0-9,.]+) (?P<U>[kKMG])i?B </h4>' - FILE_OFFLINE_PATTERN = r'(This file does not exist!)' + OFFLINE_PATTERN = r'(This file does not exist!)' FILE_TOKEN_PATTERN = r'"(/api/token\.php\?token=[a-z0-9]+)"' FILE_CONTINUE_PATTERN = r'"(/dl2/[a-z0-9]+/[a-z0-9]+)"' FILE_WAIT_PATTERN = r'\.countdown\(\{until: \+(\d+),' diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index 41f3e4b11..2c842d77b 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -20,7 +20,7 @@ class OneFichierCom(SimpleHoster): FILE_NAME_PATTERN = r'">Filename :</th>\s*<td>(?P<N>[^<]+)</td>' FILE_SIZE_PATTERN = r'<th>Size :</th>\s*<td>(?P<S>[^<]+)</td>' - FILE_OFFLINE_PATTERN = r'The (requested)? file (could not be found|has been deleted)' + OFFLINE_PATTERN = r'The (requested)? file (could not be found|has been deleted)' FILE_URL_REPLACEMENTS = [(__pattern__, r'http://\g<id>.\g<host>/en/')] diff --git a/module/plugins/hoster/PromptfileCom.py b/module/plugins/hoster/PromptfileCom.py index 3580a9509..f001a6625 100644 --- a/module/plugins/hoster/PromptfileCom.py +++ b/module/plugins/hoster/PromptfileCom.py @@ -29,7 +29,7 @@ class PromptfileCom(SimpleHoster): __author_name__ = ("igel") FILE_INFO_PATTERN = r'<span style="[^"]*" title="[^"]*">(?P<N>.*?) \((?P<S>[\d.]+) (?P<U>\w+)\)</span>' - FILE_OFFLINE_PATTERN = r'<span style="[^"]*" title="File Not Found">File Not Found</span>' + OFFLINE_PATTERN = r'<span style="[^"]*" title="File Not Found">File Not Found</span>' CHASH_PATTERN = r'<input type="hidden" name="chash" value="([^"]*)" />' DIRECT_LINK_PATTERN = r"clip: {\s*url: '(https?://(?:www\.)promptfile[^']*)'," diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index 46639444e..8909e94c6 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -34,7 +34,7 @@ class QuickshareCz(SimpleHoster): FILE_NAME_PATTERN = r'<th width="145px">Název:</th>\s*<td style="word-wrap:break-word;">(?P<N>[^<]+)</td>' FILE_SIZE_PATTERN = r'<th>Velikost:</th>\s*<td>(?P<S>[0-9.]+) (?P<U>[kKMG])i?B</td>' - FILE_OFFLINE_PATTERN = r'<script type="text/javascript">location.href=\'/chyba\';</script>' + OFFLINE_PATTERN = r'<script type="text/javascript">location.href=\'/chyba\';</script>' def process(self, pyfile): self.html = self.load(pyfile.url, decode=True) diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index b966fd1d6..11950318b 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -38,7 +38,7 @@ class RapidgatorNet(SimpleHoster): FILE_NAME_PATTERN = r'<title>Download file (?P<N>.*)</title>' FILE_SIZE_PATTERN = r'File size:\s*<strong>(?P<S>[\d\.]+) (?P<U>\w+)</strong>' - FILE_OFFLINE_PATTERN = r'>(File not found|Error 404)' + OFFLINE_PATTERN = r'>(File not found|Error 404)' 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<' diff --git a/module/plugins/hoster/RgHostNet.py b/module/plugins/hoster/RgHostNet.py index 9e37ed87b..4c6e040cb 100644 --- a/module/plugins/hoster/RgHostNet.py +++ b/module/plugins/hoster/RgHostNet.py @@ -14,7 +14,7 @@ class RgHostNet(SimpleHoster): __author_mail__ = "z00nx0@gmail.com" FILE_INFO_PATTERN = r'<h1>\s+(<a[^>]+>)?(?P<N>[^<]+)(</a>)?\s+<small[^>]+>\s+\((?P<S>[^)]+)\)\s+</small>\s+</h1>' - FILE_OFFLINE_PATTERN = r'File is deleted|this page is not found' + OFFLINE_PATTERN = r'File is deleted|this page is not found' DOWNLOAD_LINK_PATTERN = '''<a\s+href="([^"]+)"\s+class="btn\s+large\s+download"[^>]+>Download</a>''' def handleFree(self): diff --git a/module/plugins/hoster/SecureUploadEu.py b/module/plugins/hoster/SecureUploadEu.py index 1b11d691d..bf0b349e6 100644 --- a/module/plugins/hoster/SecureUploadEu.py +++ b/module/plugins/hoster/SecureUploadEu.py @@ -15,7 +15,7 @@ class SecureUploadEu(XFileSharingPro): HOSTER_NAME = "secureupload.eu" FILE_INFO_PATTERN = '<h3>Downloading (?P<N>[^<]+) \((?P<S>[^<]+)\)</h3>' - FILE_OFFLINE_PATTERN = 'The file was removed|File Not Found' + OFFLINE_PATTERN = 'The file was removed|File Not Found' getInfo = create_getInfo(SecureUploadEu) diff --git a/module/plugins/hoster/SendspaceCom.py b/module/plugins/hoster/SendspaceCom.py index d6eafac0c..8b6c9781a 100644 --- a/module/plugins/hoster/SendspaceCom.py +++ b/module/plugins/hoster/SendspaceCom.py @@ -33,7 +33,7 @@ class SendspaceCom(SimpleHoster): DOWNLOAD_URL_PATTERN = r'<a id="download_button" href="([^"]+)"' FILE_NAME_PATTERN = r'<h2 class="bgray">\s*<(?:b|strong)>(?P<N>[^<]+)</' FILE_SIZE_PATTERN = r'<div class="file_description reverse margin_center">\s*<b>File Size:</b>\s*(?P<S>[0-9.]+)(?P<U>[kKMG])i?B\s*</div>' - FILE_OFFLINE_PATTERN = r'<div class="msg error" style="cursor: default">Sorry, the file you requested is not available.</div>' + OFFLINE_PATTERN = r'<div class="msg error" style="cursor: default">Sorry, the file you requested is not available.</div>' CAPTCHA_PATTERN = r'<td><img src="(/captchas/captcha.php?captcha=([^"]+))"></td>' USER_CAPTCHA_PATTERN = r'<td><img src="/captchas/captcha.php?user=([^"]+))"></td>' diff --git a/module/plugins/hoster/ShareRapidCom.py b/module/plugins/hoster/ShareRapidCom.py index b82a142ea..aca7e995b 100644 --- a/module/plugins/hoster/ShareRapidCom.py +++ b/module/plugins/hoster/ShareRapidCom.py @@ -30,7 +30,7 @@ class ShareRapidCom(SimpleHoster): FILE_NAME_PATTERN = r'<h1[^>]*><span[^>]*>(?:<a[^>]*>)?(?P<N>[^<]+)' FILE_SIZE_PATTERN = r'<td class="i">Velikost:</td>\s*<td class="h"><strong>\s*(?P<S>[0-9.]+) (?P<U>[kKMG])i?B</strong></td>' - FILE_OFFLINE_PATTERN = ur'Nastala chyba 404|Soubor byl smazán' + OFFLINE_PATTERN = ur'Nastala chyba 404|Soubor byl smazán' DOWNLOAD_URL_PATTERN = r'<a href="([^"]+)" title="Stahnout">([^<]+)</a>' ERR_LOGIN_PATTERN = ur'<div class="error_div"><strong>Stahování je přístupné pouze přihlášeným uživatelům' diff --git a/module/plugins/hoster/SockshareCom.py b/module/plugins/hoster/SockshareCom.py index 017c8a839..60fd6a4cd 100644 --- a/module/plugins/hoster/SockshareCom.py +++ b/module/plugins/hoster/SockshareCom.py @@ -32,7 +32,7 @@ class SockshareCom(SimpleHoster): __author_mail__ = ("jeix@hasnomail.de", "l.stickell@yahoo.it", "vuolter@gmail.com") FILE_INFO_PATTERN = r'site-content">\s*<h1>(?P<N>.+)<strong>\( (?P<S>[^)]+) \)</strong></h1>' - FILE_OFFLINE_PATTERN = r'>This file doesn\'t exist, or has been removed.<' + OFFLINE_PATTERN = r'>This file doesn\'t exist, or has been removed.<' FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.sockshare.com/file/\g<ID>')] diff --git a/module/plugins/hoster/StreamCz.py b/module/plugins/hoster/StreamCz.py index bbef31a67..227324097 100644 --- a/module/plugins/hoster/StreamCz.py +++ b/module/plugins/hoster/StreamCz.py @@ -28,7 +28,7 @@ def getInfo(urls): for url in urls: html = getURL(url) - if re.search(StreamCz.FILE_OFFLINE_PATTERN, html): + if re.search(StreamCz.OFFLINE_PATTERN, html): # File offline result.append((url, 0, 1, url)) else: @@ -45,7 +45,7 @@ class StreamCz(Hoster): __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" - FILE_OFFLINE_PATTERN = r'<h1 class="commonTitle">Str.nku nebylo mo.n. nal.zt \(404\)</h1>' + OFFLINE_PATTERN = r'<h1 class="commonTitle">Str.nku nebylo mo.n. nal.zt \(404\)</h1>' FILE_NAME_PATTERN = r'<link rel="video_src" href="http://www.stream.cz/\w+/(\d+)-([^"]+)" />' CDN_PATTERN = r'<param name="flashvars" value="[^"]*&id=(?P<ID>\d+)(?:&cdnLQ=(?P<cdnLQ>\d*))?(?:&cdnHQ=(?P<cdnHQ>\d*))?(?:&cdnHD=(?P<cdnHD>\d*))?&' @@ -57,7 +57,7 @@ class StreamCz(Hoster): self.html = self.load(pyfile.url, decode=True) - if re.search(self.FILE_OFFLINE_PATTERN, self.html): + if re.search(self.OFFLINE_PATTERN, self.html): self.offline() found = re.search(self.CDN_PATTERN, self.html) diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py index f15b8b0c4..af9cdc59f 100644 --- a/module/plugins/hoster/TurbobitNet.py +++ b/module/plugins/hoster/TurbobitNet.py @@ -45,7 +45,7 @@ class TurbobitNet(SimpleHoster): # long filenames are shortened FILE_INFO_PATTERN = r"<span class='file-icon1[^>]*>(?P<N>[^<]+)</span>\s*\((?P<S>[^\)]+)\)\s*</h1>" FILE_NAME_PATTERN = r'<meta name="keywords" content="\s+(?P<N>[^,]+)' # full name but missing on page2 - FILE_OFFLINE_PATTERN = r'<h2>File Not Found</h2>|html\(\'File (?:was )?not found' + OFFLINE_PATTERN = r'<h2>File Not Found</h2>|html\(\'File (?:was )?not found' FILE_URL_REPLACEMENTS = [(r"http://(?:www\.)?(turbobit.net|unextfiles.com)/(?:download/free/)?(?P<ID>\w+).*", "http://turbobit.net/\g<ID>.html")] SH_COOKIES = [("turbobit.net", "user_lang", "en")] diff --git a/module/plugins/hoster/TusfilesNet.py b/module/plugins/hoster/TusfilesNet.py index c31b88f20..f42685a63 100644 --- a/module/plugins/hoster/TusfilesNet.py +++ b/module/plugins/hoster/TusfilesNet.py @@ -29,7 +29,7 @@ class TusfilesNet(XFileSharingPro): HOSTER_NAME = "tusfiles.net" FILE_INFO_PATTERN = r'\](?P<N>.+) - (?P<S>[\d.]+) (?P<U>\w+)\[' - FILE_OFFLINE_PATTERN = r'>File Not Found|<Title>TusFiles - Fast Sharing Files!' + OFFLINE_PATTERN = r'>File Not Found|<Title>TusFiles - Fast Sharing Files!' SH_COOKIES = [(".tusfiles.net", "lang", "english")] diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py index 7881ca098..bb9737d2e 100644 --- a/module/plugins/hoster/TwoSharedCom.py +++ b/module/plugins/hoster/TwoSharedCom.py @@ -16,7 +16,7 @@ class TwoSharedCom(SimpleHoster): FILE_NAME_PATTERN = r'<h1>(?P<N>.*)</h1>' FILE_SIZE_PATTERN = r'<span class="dtitle">File size:</span>\s*(?P<S>[0-9,.]+) (?P<U>[kKMG])i?B' - FILE_OFFLINE_PATTERN = r'The file link that you requested is not valid\.|This file was deleted\.' + OFFLINE_PATTERN = r'The file link that you requested is not valid\.|This file was deleted\.' DOWNLOAD_URL_PATTERN = r"window.location ='([^']+)';" def setup(self): diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index 282d4605b..d540505f1 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -39,7 +39,7 @@ class UlozTo(SimpleHoster): FILE_NAME_PATTERN = r'<title>(?P<N>[^<]+) \| Uloz.to</title>' FILE_SIZE_PATTERN = r'<span id="fileSize">.*?(?P<S>[0-9.]+\s[kMG]?B)</span>' FILE_INFO_PATTERN = r'<p>File <strong>(?P<N>[^<]+)</strong> is password protected</p>' - FILE_OFFLINE_PATTERN = r'<title>404 - Page not found</title>|<h1 class="h1">File (has been deleted|was banned)</h1>' + OFFLINE_PATTERN = r'<title>404 - Page not found</title>|<h1 class="h1">File (has been deleted|was banned)</h1>' FILE_SIZE_REPLACEMENTS = [('([0-9.]+)\s([kMG])B', convertDecimalPrefix)] FILE_URL_REPLACEMENTS = [(r"(?<=http://)([^/]+)", "www.ulozto.net")] @@ -142,7 +142,7 @@ class UlozTo(SimpleHoster): def doCheckDownload(self): check = self.checkDownload({ "wrong_captcha": re.compile(r'<ul class="error">\s*<li>Error rewriting the text.</li>'), - "offline": re.compile(self.FILE_OFFLINE_PATTERN), + "offline": re.compile(self.OFFLINE_PATTERN), "passwd": self.PASSWD_PATTERN, "server_error": 'src="http://img.ulozto.cz/error403/vykricnik.jpg"', # paralell dl, server overload etc. "not_found": "<title>Ulož.to</title>" diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py index d24e21779..259f415ca 100644 --- a/module/plugins/hoster/UloziskoSk.py +++ b/module/plugins/hoster/UloziskoSk.py @@ -35,7 +35,7 @@ class UloziskoSk(SimpleHoster): FILE_NAME_PATTERN = r'<div class="down1">(?P<N>[^<]+)</div>' FILE_SIZE_PATTERN = ur'Veľkosť súboru: <strong>(?P<S>[0-9.]+) (?P<U>[kKMG])i?B</strong><br />' CAPTCHA_PATTERN = r'<img src="(/obrazky/obrazky.php\?fid=[^"]+)" alt="" />' - FILE_OFFLINE_PATTERN = ur'<span class = "red">Zadaný súbor neexistuje z jedného z nasledujúcich dôvodov:</span>' + OFFLINE_PATTERN = ur'<span class = "red">Zadaný súbor neexistuje z jedného z nasledujúcich dôvodov:</span>' IMG_PATTERN = ur'<strong>PRE ZVÄČŠENIE KLIKNITE NA OBRÁZOK</strong><br /><a href = "([^"]+)">' def process(self, pyfile): diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 99db802cf..109ad0f1c 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -56,7 +56,7 @@ def parseFileInfo(self, url='', html=''): html = self.html name, size, status, found, fileid = url, 0, 3, None, None - if re.search(self.FILE_OFFLINE_PATTERN, html): + if re.search(self.OFFLINE_PATTERN, html): # File offline status = 1 else: @@ -96,7 +96,7 @@ class UploadedTo(Hoster): "netpok@gmail.com", "l.stickell@yahoo.it") FILE_INFO_PATTERN = r'<a href="file/(?P<ID>\w+)" id="filename">(?P<N>[^<]+)</a> \s*<small[^>]*>(?P<S>[^<]+)</small>' - FILE_OFFLINE_PATTERN = r'<small class="cL">Error: 404</small>' + OFFLINE_PATTERN = r'<small class="cL">Error: 404</small>' DL_LIMIT_PATTERN = "You have reached the max. number of possible free downloads for this hour" def setup(self): diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py index 6ee3dbeba..11536028a 100644 --- a/module/plugins/hoster/UploadheroCom.py +++ b/module/plugins/hoster/UploadheroCom.py @@ -36,7 +36,7 @@ class UploadheroCom(SimpleHoster): SH_COOKIES = [("http://uploadhero.co", "lang", "en")] FILE_NAME_PATTERN = r'<div class="nom_de_fichier">(?P<N>.*?)</div>' FILE_SIZE_PATTERN = r'Taille du fichier : </span><strong>(?P<S>.*?)</strong>' - FILE_OFFLINE_PATTERN = r'<p class="titre_dl_2">|<div class="raison"><strong>Le lien du fichier ci-dessus n\'existe plus.' + OFFLINE_PATTERN = r'<p class="titre_dl_2">|<div class="raison"><strong>Le lien du fichier ci-dessus n\'existe plus.' DOWNLOAD_URL_PATTERN = r'<a href="([^"]+)" id="downloadnow"' diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py index f3cc7a1c6..f84035c90 100644 --- a/module/plugins/hoster/UploadingCom.py +++ b/module/plugins/hoster/UploadingCom.py @@ -35,7 +35,7 @@ class UploadingCom(SimpleHoster): FILE_NAME_PATTERN = r'id="file_title">(?P<N>.+)</' FILE_SIZE_PATTERN = r'size tip_container">(?P<S>[\d.]+) (?P<U>\w+)<' - FILE_OFFLINE_PATTERN = r'Page not found!' + OFFLINE_PATTERN = r'Page not found!' def process(self, pyfile): # set lang to english diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index 9d1c4b3dd..69d209471 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -14,7 +14,7 @@ class UpstoreNet(SimpleHoster): __author_name__ = ("igel") FILE_INFO_PATTERN = r'<div class="comment">.*?</div>\s*\n<h2 style="margin:0">(?P<N>.*?)</h2>\s*\n<div class="comment">\s*\n\s*(?P<S>[\d.]+) (?P<U>\w+)' - FILE_OFFLINE_PATTERN = r'<span class="error">File not found</span>' + OFFLINE_PATTERN = r'<span class="error">File not found</span>' WAIT_PATTERN = r"var sec = (\d+)" CHASH_PATTERN = r'<input type="hidden" name="hash" value="([^"]*)">' diff --git a/module/plugins/hoster/UptoboxCom.py b/module/plugins/hoster/UptoboxCom.py index e403425c1..f086a9bc0 100644 --- a/module/plugins/hoster/UptoboxCom.py +++ b/module/plugins/hoster/UptoboxCom.py @@ -36,7 +36,7 @@ class UptoboxCom(XFileSharingPro): HOSTER_NAME = "uptobox.com" FILE_INFO_PATTERN = r'"para_title">(?P<N>.+) \((?P<S>[\d\.]+) (?P<U>\w+)\)' - FILE_OFFLINE_PATTERN = r'>(File not found|Access Denied|404 Not Found)' + OFFLINE_PATTERN = r'>(File not found|Access Denied|404 Not Found)' TEMP_OFFLINE_PATTERN = r'>This server is in maintenance mode' WAIT_PATTERN = r'>(\d+)</span> seconds<' diff --git a/module/plugins/hoster/VeohCom.py b/module/plugins/hoster/VeohCom.py index 15d7a98b0..472d40f01 100644 --- a/module/plugins/hoster/VeohCom.py +++ b/module/plugins/hoster/VeohCom.py @@ -30,7 +30,7 @@ class VeohCom(SimpleHoster): __author_mail__ = "vuolter@gmail.com" FILE_NAME_PATTERN = r'<meta name="title" content="(?P<N>.*?)"' - FILE_OFFLINE_PATTERN = r'>Sorry, we couldn\'t find the video you were looking for' + OFFLINE_PATTERN = r'>Sorry, we couldn\'t find the video you were looking for' FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.veoh.com/watch/\g<ID>')] diff --git a/module/plugins/hoster/VidPlayNet.py b/module/plugins/hoster/VidPlayNet.py index ade416750..8406f6b45 100644 --- a/module/plugins/hoster/VidPlayNet.py +++ b/module/plugins/hoster/VidPlayNet.py @@ -17,7 +17,7 @@ class VidPlayNet(XFileSharingPro): HOSTER_NAME = "vidplay.net" - FILE_OFFLINE_PATTERN = r'<b>File Not Found</b><br>\s*<br>' + OFFLINE_PATTERN = r'<b>File Not Found</b><br>\s*<br>' FILE_NAME_PATTERN = r'<b>Password:</b></div>\s*<h[1-6]>(?P<N>[^<]+)</h[1-6]>' DIRECT_LINK_PATTERN = r'(http://([^/]*?%s|\d+\.\d+\.\d+\.\d+)(:\d+)?(/d/|(?:/files)?/\d+/\w+/)[^"\'<&]+)' % HOSTER_NAME diff --git a/module/plugins/hoster/VimeoCom.py b/module/plugins/hoster/VimeoCom.py index 3d93d3d03..2c7f4b9c3 100644 --- a/module/plugins/hoster/VimeoCom.py +++ b/module/plugins/hoster/VimeoCom.py @@ -31,7 +31,7 @@ class VimeoCom(SimpleHoster): __author_mail__ = "vuolter@gmail.com" FILE_NAME_PATTERN = r'<title>(?P<N>.+) on Vimeo<' - FILE_OFFLINE_PATTERN = r'class="exception_header"' + OFFLINE_PATTERN = r'class="exception_header"' TEMP_OFFLINE_PATTERN = r'Please try again in a few minutes.<' FILE_URL_REPLACEMENTS = [(__pattern__, r'https://www.vimeo.com/\g<ID>')] diff --git a/module/plugins/hoster/WarserverCz.py b/module/plugins/hoster/WarserverCz.py index a80349b45..1a3a707b7 100644 --- a/module/plugins/hoster/WarserverCz.py +++ b/module/plugins/hoster/WarserverCz.py @@ -36,7 +36,7 @@ class WarserverCz(SimpleHoster): FILE_NAME_PATTERN = r'<h1.*?>(?P<N>[^<]+)</h1>' FILE_SIZE_PATTERN = r'<li>Velikost: <strong>(?P<S>[^<]+)</strong>' - FILE_OFFLINE_PATTERN = r'<h1>Soubor nenalezen</h1>' + OFFLINE_PATTERN = r'<h1>Soubor nenalezen</h1>' PREMIUM_URL_PATTERN = r'href="(http://[^/]+/dwn-premium.php.*?)"' DOMAIN = "http://csd01.coolshare.cz" diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py index f69283c47..162d0d8a8 100644 --- a/module/plugins/hoster/XFileSharingPro.py +++ b/module/plugins/hoster/XFileSharingPro.py @@ -45,7 +45,7 @@ class XFileSharingPro(SimpleHoster): FILE_NAME_PATTERN = r'<input type="hidden" name="fname" value="(?P<N>[^"]+)"' FILE_SIZE_PATTERN = r'You have requested .*\((?P<S>[\d\.\,]+) ?(?P<U>\w+)?\)</font>' FILE_INFO_PATTERN = r'<tr><td align=right><b>Filename:</b></td><td nowrap>(?P<N>[^<]+)</td></tr>\s*.*?<small>\((?P<S>[^<]+)\)</small>' - FILE_OFFLINE_PATTERN = r'>\w+ (Not Found|file (was|has been) removed)' + OFFLINE_PATTERN = r'>\w+ (Not Found|file (was|has been) removed)' WAIT_PATTERN = r'<span id="countdown_str">.*?>(\d+)</span>' #LONG_WAIT_PATTERN = r'(?P<H>\d+(?=\s*hour))?.*?(?P<M>\d+(?=\s*minute))?.*?(?P<S>\d+(?=\s*second))?' diff --git a/module/plugins/hoster/YibaishiwuCom.py b/module/plugins/hoster/YibaishiwuCom.py index e51937924..a5cc80b0f 100644 --- a/module/plugins/hoster/YibaishiwuCom.py +++ b/module/plugins/hoster/YibaishiwuCom.py @@ -33,7 +33,7 @@ class YibaishiwuCom(SimpleHoster): FILE_NAME_PATTERN = r"file_name: '(?P<N>[^']+)'" FILE_SIZE_PATTERN = r"file_size: '(?P<S>[^']+)'" - FILE_OFFLINE_PATTERN = ur'<h3><i style="color:red;">哎呀!提取码不存在!不妨搜搜看吧!</i></h3>' + OFFLINE_PATTERN = ur'<h3><i style="color:red;">哎呀!提取码不存在!不妨搜搜看吧!</i></h3>' AJAX_URL_PATTERN = r'(/\?ct=(pickcode|download)[^"\']+)' diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index b4fa4f8ac..8ccc32010 100644 --- a/module/plugins/hoster/ZippyshareCom.py +++ b/module/plugins/hoster/ZippyshareCom.py @@ -20,7 +20,7 @@ class ZippyshareCom(SimpleHoster): FILE_NAME_PATTERN = r'<title>Zippyshare\.com - (?P<N>[^<]+)</title>' FILE_SIZE_PATTERN = r'>Size:</font>\s*<font [^>]*>(?P<S>[0-9.,]+) (?P<U>[kKMG]+)i?B</font><br />' FILE_INFO_PATTERN = r'document\.getElementById\(\'dlbutton\'\)\.href = "[^;]*/(?P<N>[^"]+)";' - FILE_OFFLINE_PATTERN = r'>File does not exist on this server</div>' + OFFLINE_PATTERN = r'>File does not exist on this server</div>' SH_COOKIES = [('zippyshare.com', 'ziplocale', 'en')] diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 8c2e3daae..b5066437e 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -98,7 +98,8 @@ def parseFileInfo(self, url='', html=''): if hasattr(self, "html"): self.html = html - if hasattr(self, "FILE_OFFLINE_PATTERN") and re.search(self.FILE_OFFLINE_PATTERN, html): + if (hasattr(self, "OFFLINE_PATTERN") and re.search(self.OFFLINE_PATTERN, html)) or \ + (hasattr(self, "FILE_OFFLINE_PATTERN") and re.search(self.FILE_OFFLINE_PATTERN, html)): # File offline info['status'] = 1 else: @@ -163,7 +164,7 @@ class PluginParseError(Exception): class SimpleHoster(Hoster): __name__ = "SimpleHoster" - __version__ = "0.33" + __version__ = "0.34" __pattern__ = None __type__ = "hoster" __description__ = """Simple hoster plugin""" @@ -172,16 +173,25 @@ class SimpleHoster(Hoster): """ Following patterns should be defined by each hoster: - FILE_INFO_PATTERN = r'(?P<N>file_name) (?P<S>file_size) (?P<U>size_unit)' - or - FILE_NAME_PATTERN = r'(?P<N>file_name)' - FILE_SIZE_PATTERN = r'(?P<S>file_size) (?P<U>size_unit)' - FILE_OFFLINE_PATTERN = r'File (deleted|not found)' - TEMP_OFFLINE_PATTERN = r'Server maintainance' + FILE_INFO_PATTERN: Name and Size of the file + example: FILE_INFO_PATTERN = r'(?P<N>file_name) (?P<S>file_size) (?P<U>size_unit)' + or + FILE_NAME_PATTERN: Name that will be set for the file + example: FILE_NAME_PATTERN = r'(?P<N>file_name)' + FILE_SIZE_PATTERN: Size that will be checked for the file + example: FILE_SIZE_PATTERN = r'(?P<S>file_size) (?P<U>size_unit)' - You can also define: - PREMIUM_ONLY_PATTERN = r'Premium account required' + OFFLINE_PATTERN: Checks if the file is yet available online + example: OFFLINE_PATTERN = r'File (deleted|not found)' + or: + FILE_OFFLINE_PATTERN: Deprecated + + TEMP_OFFLINE_PATTERN: Checks if the file is temporarily offline + example: TEMP_OFFLINE_PATTERN = r'Server maintainance' + + PREMIUM_ONLY_PATTERN: (optional) Checks if the file can be downloaded only with a premium account + example: PREMIUM_ONLY_PATTERN = r'Premium account required' """ FILE_SIZE_REPLACEMENTS = [] |