From 8fe2fa85605c091369c8e69b36d1cded2cd9bbe0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Dec 2015 16:47:49 +0100 Subject: Update hosters (1) --- module/plugins/hoster/WrzucTo.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'module/plugins/hoster/WrzucTo.py') diff --git a/module/plugins/hoster/WrzucTo.py b/module/plugins/hoster/WrzucTo.py index 5c1a903a9..dc0646e4c 100644 --- a/module/plugins/hoster/WrzucTo.py +++ b/module/plugins/hoster/WrzucTo.py @@ -1,15 +1,16 @@ # -*- coding: utf-8 -*- -import pycurl import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +import pycurl + +from module.plugins.internal.SimpleHoster import SimpleHoster class WrzucTo(SimpleHoster): __name__ = "WrzucTo" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __pattern__ = r'http://(?:www\.)?wrzuc\.to/(\w+(\.wt|\.html)|(\w+/?linki/\w+))' @@ -36,7 +37,7 @@ class WrzucTo(SimpleHoster): def handle_free(self, pyfile): data = dict(re.findall(r'(md5|file): "(.*?)"', self.data)) - if len(data) != 2: + if len(data) is not 2: self.error(_("No file ID")) self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) @@ -47,10 +48,7 @@ class WrzucTo(SimpleHoster): self.data = self.load("http://www.wrzuc.to/ajax/server/download_link", post={'file': data['file']}) data.update(re.findall(r'"(download_link|server_id)":"(.*?)"', self.data)) - if len(data) != 4: + if len(data) is not 4: self.error(_("No download URL")) self.link = "http://%s.wrzuc.to/pobierz/%s" % (data['server_id'], data['download_link']) - - -getInfo = create_getInfo(WrzucTo) -- cgit v1.2.3