diff options
author | zapp-brannigan <zapp-brannigan@users.noreply.github.com> | 2015-05-27 14:58:22 +0200 |
---|---|---|
committer | zapp-brannigan <zapp-brannigan@users.noreply.github.com> | 2015-05-27 14:58:22 +0200 |
commit | b150e9d731213410345628f06c1182a662e63ec5 (patch) | |
tree | 4f870ef032054114e1addb38914e7c646c2184bb /module/plugins | |
parent | [GoogledriveCom] Fixup (diff) | |
download | pyload-b150e9d731213410345628f06c1182a662e63ec5.tar.xz |
[GoogledriveCom] Make it more flexible
Support links like
`
https://drive.google.com/uc?export=download&id=<dl_id_here>
`
See forum: http://forum.pyload.org/viewtopic.php?f=13&t=4203
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/hoster/GoogledriveCom.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py index 5a8862e6b..871ce0f2b 100644 --- a/module/plugins/hoster/GoogledriveCom.py +++ b/module/plugins/hoster/GoogledriveCom.py @@ -13,9 +13,9 @@ from module.utils import html_unescape class GoogledriveCom(SimpleHoster): __name__ = "GoogledriveCom" __type__ = "hoster" - __version__ = "0.10" + __version__ = "0.11" - __pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/file/d/\w+' + __pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/(file/d/\w+|uc.+?)' __config__ = [("use_premium", "bool", "Use premium account if available", True)] __description__ = """Drive.google.com hoster plugin""" @@ -38,6 +38,10 @@ class GoogledriveCom(SimpleHoster): def handleFree(self, pyfile): + if "export=download" in self.pyfile.url: + dl_id = self.pyfile.url.split("id=")[1] + self.html = self.load("https://docs.google.com/file/d/%s/edit" %dl_id) + self.pyfile.name = re.search(self.NAME_PATTERN,self.html).group(1) for _i in xrange(2): m = re.search(self.LINK_FREE_PATTERN, self.html) |