From 6aefe12d783c19e9e983b599903738dbb3de9587 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Fri, 25 Nov 2011 19:18:50 +0100 Subject: add fshare.vn premium --- module/plugins/hoster/FshareVn.py | 49 +++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster/FshareVn.py') diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py index 13f15716f..91cc167b1 100644 --- a/module/plugins/hoster/FshareVn.py +++ b/module/plugins/hoster/FshareVn.py @@ -1,26 +1,51 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo +from module.network.RequestFactory import getURL import re +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 + class FshareVn(SimpleHoster): __name__ = "FshareVn" __type__ = "hoster" __pattern__ = r"http://(www\.)?fshare.vn/file/.*" - __version__ = "0.10" + __version__ = "0.11" __description__ = """FshareVn Download Hoster""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - FILE_INFO_PATTERN = ur'

Tên file:\s*(?P[^<]+)

\s*

Dung lượng file:\s*(?P[0-9,.]+)\s*(?P[kKMG])i?B

' - FILE_OFFLINE_PATTERN = r'511' + FILE_INFO_PATTERN = r'

(?P[^<]+)<\\/p>\\r\\n\s*

(?P[0-9,.]+)\s*(?P[kKMG])i?B<\\/p>' + FILE_OFFLINE_PATTERN = r'