summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-28 01:59:42 +0100
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-28 01:59:42 +0100
commitccc8e88b850846d50089f1f575a3cc2288c3a885 (patch)
treed44b796fae53778ce5214557fa39278d933d699a /module/plugins
parentSpare code cosmetics (diff)
downloadpyload-ccc8e88b850846d50089f1f575a3cc2288c3a885.tar.xz
[GoogledriveCom] Improve
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hoster/GoogledriveCom.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py
index d07b5121e..81926080a 100644
--- a/module/plugins/hoster/GoogledriveCom.py
+++ b/module/plugins/hoster/GoogledriveCom.py
@@ -12,7 +12,7 @@ from module.utils import html_unescape
class GoogledriveCom(SimpleHoster):
__name__ = "GoogledriveCom"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'https?://(?:www\.)?drive\.google\.com/file/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -22,7 +22,7 @@ class GoogledriveCom(SimpleHoster):
__authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")]
- DISPOSITION = False
+ DISPOSITION = False #: Remove in 0.4.10
NAME_PATTERN = r'"og:title" content="(?P<N>.*?)">'
OFFLINE_PATTERN = r'align="center"><p class="errorMessage"'
@@ -34,6 +34,16 @@ class GoogledriveCom(SimpleHoster):
self.chunkLimit = 1
+ #@NOTE: Temp work-around to `Content-Disposition=filename*=UTF-8` bug!
+ def handleDirect(self, pyfile):
+ self.link = self.directLink(pyfile.url, self.resumeDownload)
+
+ if self.link:
+ remote = urllib2.urlopen(link)
+ name = remote.info()['Content-Disposition'].split(';')
+ pyfile.name = name[1].split('filename=')[1][1:]
+
+
def handleFree(self, pyfile):
try:
link1 = re.search(r'"(https://docs.google.com/uc\?id.*?export=download)",',