summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-25 13:52:28 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-25 13:52:28 +0200
commit4b939b3a2859fc55366b93d161f9174a4094d885 (patch)
tree78dc41e6762f5a3a2669c92e42fec7bf42be77b7
parentNew crypter: GoogledriveComFolder (diff)
downloadpyload-4b939b3a2859fc55366b93d161f9174a4094d885.tar.xz
[GoogledriveCom] Improve __pattern__
-rw-r--r--module/plugins/hoster/GoogledriveCom.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py
index 09c54a8da..c7830b734 100644
--- a/module/plugins/hoster/GoogledriveCom.py
+++ b/module/plugins/hoster/GoogledriveCom.py
@@ -4,6 +4,7 @@
# https://drive.google.com/file/d/0B6RNTe4ygItBQm15RnJiTmMyckU/view?pli=1
import re
+import urlparse
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
from module.utils import html_unescape
@@ -12,9 +13,9 @@ from module.utils import html_unescape
class GoogledriveCom(SimpleHoster):
__name__ = "GoogledriveCom"
__type__ = "hoster"
- __version__ = "0.08"
+ __version__ = "0.09"
- __pattern__ = r'https?://(?:www\.)?drive\.google\.com/file/.+'
+ __pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/file/d/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Drive.google.com hoster plugin"""
@@ -57,7 +58,7 @@ class GoogledriveCom(SimpleHoster):
else:
self.logDebug("Next hop: %s" % link2)
- link3 = self.load("https://docs.google.com" + link2, just_header=True)
+ link3 = self.load(urlparse.urljoin("https://docs.google.com", link2), just_header=True)
self.logDebug("DL-Link: %s" % link3['location'])
self.link = link3['location']