From c9b42f02f83a95d7741eee96247466d3b610b159 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 23 Oct 2015 13:29:12 +0200 Subject: self.html -> self.data --- module/plugins/hoster/HighWayMe.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'module/plugins/hoster/HighWayMe.py') 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 "9" in self.html: + elif "9" 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 "8" in self.html: + elif "8" 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'([^<]+)', self.html).group(1) + self.pyfile.name = re.search(r'([^<]+)', self.data).group(1) except AttributeError: self.pyfile.name = "" try: - self.pyfile.size = re.search(r'(\d+)', self.html).group(1) + self.pyfile.size = re.search(r'(\d+)', self.data).group(1) except AttributeError: self.pyfile.size = 0 - self.link = re.search(r'([^<]+)', self.html).group(1) + self.link = re.search(r'([^<]+)', self.data).group(1) getInfo = create_getInfo(HighWayMe) -- cgit v1.2.3