summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-27 22:40:28 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-27 22:40:28 +0200
commit3ed20d4c8e71e1bbe28c637bdb875f7616588fbc (patch)
tree5458076ac5a0dcbe855fe80534d13ff463bb3052 /module/plugins
parentMerge pull request #1431 from zapp-brannigan/patch-2 (diff)
parent[GoogledriveCom] Make it more flexible (diff)
downloadpyload-3ed20d4c8e71e1bbe28c637bdb875f7616588fbc.tar.xz
Merge pull request #1430 from zapp-brannigan/patch-1
[GoogledriveCom] Make it more flexible
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hoster/GoogledriveCom.py8
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)