summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/GoogledriveCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/GoogledriveCom.py')
-rw-r--r--module/plugins/hoster/GoogledriveCom.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py
index 871ce0f2b..1c33a1e4e 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.11"
+ __version__ = "0.12"
- __pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/(file/d/\w+|uc.+?)'
+ __pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/(file/d/\w+|uc\?.*id=)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Drive.google.com hoster plugin"""
@@ -25,7 +25,7 @@ class GoogledriveCom(SimpleHoster):
DISPOSITION = False #: Remove in 0.4.10
- NAME_PATTERN = r'"og:title" content="(?P<N>.*?)">'
+ NAME_PATTERN = r'(?:<title>|class="uc-name-size".*>)(?P<N>.+?)(?: - Google Drive</title>|</a> \()'
OFFLINE_PATTERN = r'align="center"><p class="errorMessage"'
LINK_FREE_PATTERN = r'"([^"]+uc\?.*?)"'
@@ -38,10 +38,6 @@ 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)