From 8e7d14bae4d3c836f029a1235eb227380acc3f75 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 16 Feb 2015 21:59:10 +0100 Subject: Fix plugins to work on 0.4.10 --- pyload/plugin/hoster/GoogledriveCom.py | 62 ++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 pyload/plugin/hoster/GoogledriveCom.py (limited to 'pyload/plugin/hoster/GoogledriveCom.py') diff --git a/pyload/plugin/hoster/GoogledriveCom.py b/pyload/plugin/hoster/GoogledriveCom.py new file mode 100644 index 000000000..14a9d058d --- /dev/null +++ b/pyload/plugin/hoster/GoogledriveCom.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -* +# +# Test links: +# https://drive.google.com/file/d/0B6RNTe4ygItBQm15RnJiTmMyckU/view?pli=1 + +import re + +from pyload.plugin.internal.SimpleHoster import SimpleHoster +from pyload.utils import html_unescape + + +class GoogledriveCom(SimpleHoster): + __name__ = "GoogledriveCom" + __type__ = "hoster" + __version__ = "0.03" + + __pattern__ = r'https?://(?:www\.)?drive\.google\.com/file/.+' + + __description__ = """Drive.google.com hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] + + + DISPOSITION = False + + NAME_PATTERN = r'"og:title" content="(?P.*?)">' + OFFLINE_PATTERN = r'align="center">

', + self.html).group(1)) + + except AttributeError: + self.error(_("Hop #2 not found")) + + else: + self.logDebug("Next hop: %s" % link2) + + link3 = self.load("https://docs.google.com" + link2, just_header=True) + self.logDebug("DL-Link: %s" % link3['location']) + + self.link = link3['location'] -- cgit v1.2.3