diff options
author | 2016-01-02 16:01:56 +0100 | |
---|---|---|
committer | 2016-01-02 16:01:56 +0100 | |
commit | 6c75c0363f496df86e9c744a9a946f86f82715fa (patch) | |
tree | 53e5b7f906e2b9fb1d853d2b0599be7a8c5c7a3d /module/plugins/hoster/MegaRapidCz.py | |
parent | Timeout for http request set to 1 minute + report effective url address in he... (diff) | |
download | pyload-6c75c0363f496df86e9c744a9a946f86f82715fa.tar.xz |
Spare code cosmetics
Diffstat (limited to 'module/plugins/hoster/MegaRapidCz.py')
-rw-r--r-- | module/plugins/hoster/MegaRapidCz.py | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/module/plugins/hoster/MegaRapidCz.py b/module/plugins/hoster/MegaRapidCz.py index 3d1b288d6..4ba13c57f 100644 --- a/module/plugins/hoster/MegaRapidCz.py +++ b/module/plugins/hoster/MegaRapidCz.py @@ -10,17 +10,6 @@ from module.plugins.internal.Base import parse_fileInfo from module.plugins.internal.SimpleHoster import SimpleHoster -def get_info(urls): - h = get_request() - h.c.setopt(pycurl.HTTPHEADER, - ["Accept: text/html", - "User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0"]) - - for url in urls: - html = h.load(url) - yield parse_fileInfo(MegaRapidCz, url, html) - - class MegaRapidCz(SimpleHoster): __name__ = "MegaRapidCz" __type__ = "hoster" @@ -42,13 +31,13 @@ class MegaRapidCz(SimpleHoster): ("Walter Purcaro", "vuolter@gmail.com")] - NAME_PATTERN = r'<h1.*?><span.*?>(?:<a.*?>)?(?P<N>[^<]+)' - SIZE_PATTERN = r'<td class="i">Velikost:</td>\s*<td class="h"><strong>\s*(?P<S>[\d.,]+) (?P<U>[\w^_]+)</strong></td>' + NAME_PATTERN = r'<h1.*?><span.*?>(?:<a.*?>)?(?P<N>.+?)' + SIZE_PATTERN = r'<td class="i">Velikost:</td>\s*<td class="h"><strong>\s*(?P<S>[\d.,]+) (?P<U>[\w^_]+)</strong></td>' OFFLINE_PATTERN = ur'Nastala chyba 404|Soubor byl smazán' CHECK_TRAFFIC = True - LINK_PREMIUM_PATTERN = r'<a href="(.+?)" title="Stahnout">([^<]+)</a>' + LINK_PREMIUM_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' ERR_CREDIT_PATTERN = ur'<div class="error_div"><strong>Stahování zdarma je možné jen přes náš' |