From cdb06469a640c1875229903a2dbdfa8be469b5bc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 13:52:30 +0100 Subject: Improve a lot of plugin __pattern__ --- module/plugins/hoster/TwoSharedCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/TwoSharedCom.py') diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py index 59a8ce6e1..1dd67f974 100644 --- a/module/plugins/hoster/TwoSharedCom.py +++ b/module/plugins/hoster/TwoSharedCom.py @@ -10,7 +10,7 @@ class TwoSharedCom(SimpleHoster): __type__ = "hoster" __version__ = "0.12" - __pattern__ = r'http://(?:www\.)?2shared\.com/(account/)?(download|get|file|document|photo|video|audio)/.*' + __pattern__ = r'http://(?:www\.)?2shared\.com/(account/)?(download|get|file|document|photo|video|audio)/.+' __description__ = """2Shared.com hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 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/TwoSharedCom.py | 41 ----------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 module/plugins/hoster/TwoSharedCom.py (limited to 'module/plugins/hoster/TwoSharedCom.py') diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py deleted file mode 100644 index 1dd67f974..000000000 --- a/module/plugins/hoster/TwoSharedCom.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo - - -class TwoSharedCom(SimpleHoster): - __name__ = "TwoSharedCom" - __type__ = "hoster" - __version__ = "0.12" - - __pattern__ = r'http://(?:www\.)?2shared\.com/(account/)?(download|get|file|document|photo|video|audio)/.+' - - __description__ = """2Shared.com hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - - - NAME_PATTERN = r'

(?P.*)

' - SIZE_PATTERN = r'File size:\s*(?P[\d.,]+) (?P[\w^_]+)' - OFFLINE_PATTERN = r'The file link that you requested is not valid\.|This file was deleted\.' - - LINK_PATTERN = r'window.location =\'(.+?)\';' - - - def setup(self): - self.resumeDownload = True - self.multiDL = True - - - def handleFree(self): - m = re.search(self.LINK_PATTERN, self.html) - if m is None: - self.error(_("Download link")) - - link = m.group(1) - self.download(link) - - -getInfo = create_getInfo(TwoSharedCom) -- cgit v1.2.3 From ea2d07843d369d8b8fd2aa02930bf549ce94a661 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 9 Jan 2015 03:25:42 +0100 Subject: Spare fixes --- module/plugins/hoster/TwoSharedCom.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 module/plugins/hoster/TwoSharedCom.py (limited to 'module/plugins/hoster/TwoSharedCom.py') diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py new file mode 100644 index 000000000..c6ca2ab29 --- /dev/null +++ b/module/plugins/hoster/TwoSharedCom.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- + +import re + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class TwoSharedCom(SimpleHoster): + __name__ = "TwoSharedCom" + __type__ = "hoster" + __version__ = "0.13" + + __pattern__ = r'http://(?:www\.)?2shared\.com/(account/)?(download|get|file|document|photo|video|audio)/.+' + + __description__ = """2Shared.com hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + + + NAME_PATTERN = r'

(?P.*)

' + SIZE_PATTERN = r'File size:\s*(?P[\d.,]+) (?P[\w^_]+)' + OFFLINE_PATTERN = r'The file link that you requested is not valid\.|This file was deleted\.' + + LINK_FREE_PATTERN = r'window.location =\'(.+?)\';' + + + def setup(self): + self.resumeDownload = True + self.multiDL = True + + +getInfo = create_getInfo(TwoSharedCom) -- cgit v1.2.3 From 7d90803262ccbb4fc5296a4dc3ce30fe98f55631 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 25 Mar 2015 23:10:07 +0100 Subject: __config__ cosmetics --- module/plugins/hoster/TwoSharedCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/TwoSharedCom.py') diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py index c6ca2ab29..086228637 100644 --- a/module/plugins/hoster/TwoSharedCom.py +++ b/module/plugins/hoster/TwoSharedCom.py @@ -11,6 +11,7 @@ class TwoSharedCom(SimpleHoster): __version__ = "0.13" __pattern__ = r'http://(?:www\.)?2shared\.com/(account/)?(download|get|file|document|photo|video|audio)/.+' + __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """2Shared.com hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3