# -*- coding: utf-8 -*- import re from time import strptime, mktime, gmtime from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo from module.network.RequestFactory import getURL def getInfo(urls): for url in urls: html = getURL('http://www.fshare.vn/check_link.php', post={ "action": "check_link", "arrlinks": url }, decode=True) file_info = parseFileInfo(FshareVn, url, html) yield file_info def doubleDecode(m): return m.group(1).decode('raw_unicode_escape') class FshareVn(SimpleHoster): __name__ = "FshareVn" __type__ = "hoster" __pattern__ = r'http://(?:www\.)?fshare.vn/file/.*' __version__ = "0.16" __description__ = """FshareVn hoster plugin""" __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" FILE_INFO_PATTERN = r'
(?P (?P <\\/p>\\t\\t\\r\\n\\t\\t 0 KB<\\/p>'
FILE_NAME_REPLACEMENTS = [("(.*)", doubleDecode)]
DOWNLOAD_URL_PATTERN = r'action="(http://download.*?)[#"]'
VIP_URL_PATTERN = r'[0-9,.]+)\s*(?P[kKMG])i?B<\\/p>'
FILE_OFFLINE_PATTERN = r'