# -*- coding: utf-8 -*- # # Test links: # http://uploadhero.co/dl/wQBRAVSM import re from urlparse import urljoin from pyload.plugin.internal.SimpleHoster import SimpleHoster class UploadheroCom(SimpleHoster): __name = "UploadheroCom" __type = "hoster" __version = "0.18" __pattern = r'http://(?:www\.)?uploadhero\.com?/dl/\w+' __config = [("use_premium", "bool", "Use premium account if available", True)] __description = """UploadHero.co plugin""" __license = "GPLv3" __authors = [("mcmyst", "mcmyst@hotmail.fr"), ("zoidberg", "zoidberg@mujmail.cz")] NAME_PATTERN = r'
(?P.+?)<' SIZE_PATTERN = r'>Filesize: (?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = r'

' COOKIES = [("uploadhero.co", "lang", "en")] IP_BLOCKED_PATTERN = r'href="(/lightbox_block_download\.php\?min=.+?)"' IP_WAIT_PATTERN = r'(\d+).*\s*(\d+)' CAPTCHA_PATTERN = r'"(/captchadl\.php\?\w+)"' LINK_FREE_PATTERN = r'var magicomfg = \'