From fd105f8e51768ec1943cda2375bdfdbe5b0a3951 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 9 Jan 2015 00:35:51 +0100 Subject: "New Year" Update: hoster plugins --- module/plugins/hoster/YourfilesTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/YourfilesTo.py') diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py index 83ab89110..e0def108e 100644 --- a/module/plugins/hoster/YourfilesTo.py +++ b/module/plugins/hoster/YourfilesTo.py @@ -10,9 +10,9 @@ from module.plugins.Hoster import Hoster class YourfilesTo(Hoster): __name__ = "YourfilesTo" __type__ = "hoster" - __version__ = "0.21" + __version__ = "0.22" - __pattern__ = r'(http://)?(?:www\.)?yourfiles\.(to|biz)/\?d=\w+' + __pattern__ = r'http://(?:www\.)?yourfiles\.(to|biz)/\?d=\w+' __description__ = """Youfiles.to hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 02e3ede3edcf4415ac466fbea9d4f25d9ccc8671 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Apr 2015 15:38:01 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/YourfilesTo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/YourfilesTo.py') diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py index e0def108e..fd65a6a41 100644 --- a/module/plugins/hoster/YourfilesTo.py +++ b/module/plugins/hoster/YourfilesTo.py @@ -81,7 +81,7 @@ class YourfilesTo(Hoster): if not self.html: self.download_html() - if re.search(r"HTTP Status 404", self.html) is not None: + if re.search(r"HTTP Status 404", self.html): return False else: return True -- cgit v1.2.3 From 1ef93e913238275f7657d496ba3d2e7eeb5a30a2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 May 2015 01:06:01 +0200 Subject: Use 'import' instead 'from' --- module/plugins/hoster/YourfilesTo.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/YourfilesTo.py') diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py index fd65a6a41..d0316d3ac 100644 --- a/module/plugins/hoster/YourfilesTo.py +++ b/module/plugins/hoster/YourfilesTo.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- -import re - -from urllib import unquote +import reimport urllib from module.plugins.Hoster import Hoster @@ -62,7 +60,7 @@ class YourfilesTo(Hoster): url = re.search(r"var bla = '(.*?)';", self.html) if url: url = url.group(1) - url = unquote(url.replace("http://http:/http://", "http://").replace("dumdidum", "")) + url = urllib.unquote(url.replace("http://http:/http://", "http://").replace("dumdidum", "")) return url else: self.error(_("Absolute filepath not found")) -- cgit v1.2.3