# -*- coding: utf-8 -*- import pycurl import re from pyload.network.HTTPRequest import BadHeader from pyload.network.RequestFactory import getRequest from pyload.plugin.internal.SimpleHoster import SimpleHoster, parseFileInfo def getInfo(urls): h = getRequest() 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, decode=True) yield parseFileInfo(MegaRapidCz, url, html) class MegaRapidCz(SimpleHoster): __name = "MegaRapidCz" __type = "hoster" __version = "0.56" __pattern = r'http://(?:www\.)?(share|mega)rapid\.cz/soubor/\d+/.+' __config = [("use_premium", "bool", "Use premium account if available", True)] __description = """MegaRapid.cz hoster plugin""" __license = "GPLv3" __authors = [("MikyWoW", "mikywow@seznam.cz"), ("zoidberg", "zoidberg@mujmail.cz"), ("stickell", "l.stickell@yahoo.it"), ("Walter Purcaro", "vuolter@gmail.com")] NAME_PATTERN = r'