From 8e7d14bae4d3c836f029a1235eb227380acc3f75 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 16 Feb 2015 21:59:10 +0100 Subject: Fix plugins to work on 0.4.10 --- module/plugins/accounts/FshareVn.py | 63 ------------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 module/plugins/accounts/FshareVn.py (limited to 'module/plugins/accounts/FshareVn.py') diff --git a/module/plugins/accounts/FshareVn.py b/module/plugins/accounts/FshareVn.py deleted file mode 100644 index 282a17751..000000000 --- a/module/plugins/accounts/FshareVn.py +++ /dev/null @@ -1,63 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from time import mktime, strptime - -from pyload.plugin.Account import Account - - -class FshareVn(Account): - __name__ = "FshareVn" - __type__ = "account" - __version__ = "0.09" - - __description__ = """Fshare.vn account plugin""" - __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz"), - ("stickell", "l.stickell@yahoo.it")] - - - VALID_UNTIL_PATTERN = ur'
Thời hạn dùng:
\s*
([^<]+)
' - LIFETIME_PATTERN = ur'
Lần đăng nhập trước:
\s*
[^<]+
' - TRAFFIC_LEFT_PATTERN = ur'
Tổng Dung Lượng Tài Khoản
\s*]*>([\d.]+) ([kKMG])B' - DIRECT_DOWNLOAD_PATTERN = ur']*)[^>]*/>Kích hoạt download trực tiếp' - - - def loadAccountInfo(self, user, req): - html = req.load("http://www.fshare.vn/account_info.php", decode=True) - - if re.search(self.LIFETIME_PATTERN, html): - self.logDebug("Lifetime membership detected") - trafficleft = self.getTrafficLeft() - return {"validuntil": -1, "trafficleft": trafficleft, "premium": True} - - m = re.search(self.VALID_UNTIL_PATTERN, html) - if m: - premium = True - validuntil = mktime(strptime(m.group(1), '%I:%M:%S %p %d-%m-%Y')) - trafficleft = self.getTrafficLeft() - else: - premium = False - validuntil = None - trafficleft = None - - return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium} - - - def login(self, user, data, req): - html = req.load("https://www.fshare.vn/login.php", - post={'LoginForm[email]' : user, - 'LoginForm[password]' : data['password'], - 'LoginForm[rememberMe]': 1, - 'yt0' : "Login"}, - referer=True, - decode=True) - - if not re.search(r'