summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/HighWayMe.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-23 13:29:12 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-23 13:29:12 +0200
commitc9b42f02f83a95d7741eee96247466d3b610b159 (patch)
treeba642be8eeb25233e83763aab2aa6227b31c7885 /module/plugins/hoster/HighWayMe.py
parent[Dereferer] Don't preload (diff)
downloadpyload-c9b42f02f83a95d7741eee96247466d3b610b159.tar.xz
self.html -> self.data
Diffstat (limited to 'module/plugins/hoster/HighWayMe.py')
-rw-r--r--module/plugins/hoster/HighWayMe.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/module/plugins/hoster/HighWayMe.py b/module/plugins/hoster/HighWayMe.py
index c3baf326d..391a55c2f 100644
--- a/module/plugins/hoster/HighWayMe.py
+++ b/module/plugins/hoster/HighWayMe.py
@@ -27,33 +27,33 @@ class HighWayMe(MultiHoster):
def check_errors(self):
- if self.html.get('code') == 302: #@NOTE: This is not working. It should by if 302 Moved Temporarily then... But I don't now how to implement it.
+ if self.data.get('code') == 302: #@NOTE: This is not working. It should by if 302 Moved Temporarily then... But I don't now how to implement it.
self.account.relogin()
self.retry()
- elif "<code>9</code>" in self.html:
+ elif "<code>9</code>" 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"))
self.retry(wait=seconds_to_midnight(), msg="Daily limit for this host reached")
- elif "<code>8</code>" in self.html:
+ elif "<code>8</code>" 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("https://high-way.me/load.php",
+ self.data = self.load("https://high-way.me/load.php",
get={'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,18 +62,18 @@ class HighWayMe(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
- self.link = re.search(r'<download>([^<]+)</download>', self.html).group(1)
+ self.link = re.search(r'<download>([^<]+)</download>', self.data).group(1)
getInfo = create_getInfo(HighWayMe)