diff options
Diffstat (limited to 'module/plugins/hoster/ShareRapidCom.py')
-rw-r--r-- | module/plugins/hoster/ShareRapidCom.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/module/plugins/hoster/ShareRapidCom.py b/module/plugins/hoster/ShareRapidCom.py index 21512046e..b9ce61e18 100644 --- a/module/plugins/hoster/ShareRapidCom.py +++ b/module/plugins/hoster/ShareRapidCom.py @@ -8,31 +8,27 @@ from module.network.HTTPRequest import BadHeader from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo def getInfo(urls): - result = [] - + file_info = [] for url in urls: h = getRequest() try: h.c.setopt(HTTPHEADER, ["Accept: text/html"]) html = h.load(url, cookies = True, decode = True) - - file_info = parseFileInfo(ShareRapidCom, url, getURL(url, decode=True)) - result.append(file_info) + file_info = parseFileInfo(ShareRapidCom, url, html) finally: h.close() - - yield result + yield file_info class ShareRapidCom(SimpleHoster): __name__ = "ShareRapidCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?((share(-?rapid\.(biz|com|cz|info|eu|net|org|pl|sk)|-(central|credit|free|net)\.cz|-ms\.net)|(s-?rapid|rapids)\.(cz|sk))|(e-stahuj|mediatack|premium-rapidshare|rapidshare-premium|qiuck)\.cz|kadzet\.com|stahuj-zdarma\.eu|strelci\.net|universal-share\.com)/(stahuj/.+)" - __version__ = "0.46" + __version__ = "0.47" __description__ = """Share-rapid.com plugin - premium only""" __author_name__ = ("MikyWoW", "zoidberg") __author_mail__ = ("MikyWoW@seznam.cz", "zoidberg@mujmail.cz") - FILE_NAME_PATTERN = r'(?:title="Stahnout"|<h3>)(?P<N>[^<]+)</(?:a|h3)>' + 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>' 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' |