From acc46fc3497a66a427b795b4a22c6e71d69185a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 13 Dec 2014 15:56:57 +0100 Subject: Update --- pyload/plugin/hoster/TwoSharedCom.py | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pyload/plugin/hoster/TwoSharedCom.py (limited to 'pyload/plugin/hoster/TwoSharedCom.py') diff --git a/pyload/plugin/hoster/TwoSharedCom.py b/pyload/plugin/hoster/TwoSharedCom.py new file mode 100644 index 000000000..6d16ae1a6 --- /dev/null +++ b/pyload/plugin/hoster/TwoSharedCom.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- + +import re + +from pyload.plugin.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