summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/SimplyPremiumCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/SimplyPremiumCom.py')
-rw-r--r--module/plugins/hoster/SimplyPremiumCom.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py
index cc48db4fd..43aeabb24 100644
--- a/module/plugins/hoster/SimplyPremiumCom.py
+++ b/module/plugins/hoster/SimplyPremiumCom.py
@@ -27,33 +27,33 @@ class SimplyPremiumCom(MultiHoster):
def check_errors(self):
- if '<valid>0</valid>' in self.html or (
- "You are not allowed to download from this host" in self.html and self.premium):
+ if '<valid>0</valid>' in self.data or (
+ "You are not allowed to download from this host" in self.data and self.premium):
self.account.relogin()
self.retry()
- elif "NOTFOUND" in self.html:
+ elif "NOTFOUND" in self.data:
self.offline()
- elif "downloadlimit" in self.html:
+ elif "downloadlimit" in self.data:
self.log_warning(_("Reached maximum connctions"))
self.retry(5, 60, _("Reached maximum connctions"))
- elif "trafficlimit" in self.html:
+ elif "trafficlimit" in self.data:
self.log_warning(_("Reached daily limit for this host"))
self.retry(wait=seconds_to_midnight(), msg="Daily limit for this host reached")
- elif "hostererror" in self.html:
+ elif "hostererror" in self.data:
self.log_warning(_("Hoster temporarily unavailable, waiting 1 minute and retry"))
self.retry(5, 60, _("Hoster is temporarily unavailable"))
def handle_premium(self, pyfile):
for i in xrange(5):
- self.html = self.load("http://www.simply-premium.com/premium.php", get={'info': "", 'link': self.pyfile.url})
+ self.data = self.load("http://www.simply-premium.com/premium.php", get={'info': "", 'link': self.pyfile.url})
- if self.html:
- self.log_debug("JSON data: " + self.html)
+ if self.data:
+ self.log_debug("JSON data: " + self.data)
break
else:
self.log_info(_("Unable to get API data, waiting 1 minute and retry"))
@@ -62,19 +62,19 @@ class SimplyPremiumCom(MultiHoster):
self.check_errors()
try:
- self.pyfile.name = re.search(r'<name>([^<]+)</name>', self.html).group(1)
+ self.pyfile.name = re.search(r'<name>([^<]+)</name>', self.data).group(1)
except AttributeError:
self.pyfile.name = ""
try:
- self.pyfile.size = re.search(r'<size>(\d+)</size>', self.html).group(1)
+ self.pyfile.size = re.search(r'<size>(\d+)</size>', self.data).group(1)
except AttributeError:
self.pyfile.size = 0
try:
- self.link = re.search(r'<download>([^<]+)</download>', self.html).group(1)
+ self.link = re.search(r'<download>([^<]+)</download>', self.data).group(1)
except AttributeError:
self.link = 'http://www.simply-premium.com/premium.php?link=' + self.pyfile.url