# -*- coding: utf-8 -*- import re from pycurl import HTTPHEADER from module.network.RequestFactory import getRequest from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo def getInfo(urls): h = getRequest() h.c.setopt(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, decode=True) file_info = parseFileInfo(ShareRapidCom, url, html) yield file_info class ShareRapidCom(SimpleHoster): __name__ = "ShareRapidCom" __type__ = "hoster" __version__ = "0.54" __pattern__ = r'http://(?:www\.)?(share|mega)rapid\.cz/soubor/\d+/.+' __description__ = """MegaRapid.cz hoster plugin""" __authors__ = [("MikyWoW", "mikywow@seznam.cz"), ("zoidberg", "zoidberg@mujmail.cz"), ("stickell", "l.stickell@yahoo.it"), ("Walter Purcaro", "vuolter@gmail.com")] FILE_NAME_PATTERN = r'