summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/account/NowVideoSx.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-16 10:46:28 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-16 10:46:28 +0100
commitce1c2b6b05c08b669357947e61ae40efce7fc50f (patch)
tree0b5f7996960cf35c4eface53a89eba18a37519b7 /pyload/plugin/account/NowVideoSx.py
parentFix filename case (diff)
downloadpyload-ce1c2b6b05c08b669357947e61ae40efce7fc50f.tar.xz
module temp
Diffstat (limited to 'pyload/plugin/account/NowVideoSx.py')
-rw-r--r--pyload/plugin/account/NowVideoSx.py56
1 files changed, 0 insertions, 56 deletions
diff --git a/pyload/plugin/account/NowVideoSx.py b/pyload/plugin/account/NowVideoSx.py
deleted file mode 100644
index d2527d635..000000000
--- a/pyload/plugin/account/NowVideoSx.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from time import gmtime, mktime, strptime
-
-from pyload.plugin.Account import Account
-
-
-class NowVideoAt(Account):
- __name__ = "NowVideoAt"
- __type__ = "account"
- __version__ = "0.01"
-
- __description__ = """NowVideo.at account plugin"""
- __license__ = "GPLv3"
- __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
-
-
- VALID_UNTIL_PATTERN = r'>Your premium membership expires on: (.+?)<'
-
-
- def loadAccountInfo(self, user, req):
- validuntil = None
- trafficleft = -1
- premium = None
-
- html = req.load("http://www.nowvideo.at/premium.php")
-
- m = re.search(self.VALID_UNTIL_PATTERN, html)
- if m:
- expiredate = m.group(1).strip()
- self.logDebug("Expire date: " + expiredate)
-
- try:
- validuntil = mktime(strptime(expiredate, "%Y-%b-%d"))
-
- except Exception, e:
- self.logError(e)
-
- else:
- if validuntil > mktime(gmtime()):
- premium = True
- else:
- premium = False
- validuntil = -1
-
- return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}
-
-
- def login(self, user, data, req):
- html = req.load("http://www.nowvideo.at/login.php",
- post={'user': user, 'pass': data['password']})
-
- if ">Invalid login details" is html:
- self.wrongPassword()