diff options
author | 2015-10-02 10:09:26 +0200 | |
---|---|---|
committer | 2015-10-02 10:09:26 +0200 | |
commit | 3a08656c5665f4b8db98744fb323e64b8630e084 (patch) | |
tree | 28f9f62ffc57888b76ca32540dbf5af3a4cfc8d0 /module/plugins/hoster/GoogledriveCom.py | |
parent | Merge pull request #1 from pyload/stable (diff) | |
parent | [Account] Improve parse_traffic method + code cosmetics (diff) | |
download | pyload-3a08656c5665f4b8db98744fb323e64b8630e084.tar.xz |
Merge pull request #2 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/hoster/GoogledriveCom.py')
-rw-r--r-- | module/plugins/hoster/GoogledriveCom.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py index 903b5361e..c6b84b776 100644 --- a/module/plugins/hoster/GoogledriveCom.py +++ b/module/plugins/hoster/GoogledriveCom.py @@ -41,19 +41,16 @@ class GoogledriveCom(SimpleHoster): m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: - self.error(_("Free download link not found")) + return + link = self.fixurl(link, "https://docs.google.com/") + direct_link = self.direct_link(link, False) + + if not direct_link: + self.html = self.load(link) else: - link = html_unescape(m.group(1).decode('unicode-escape')) - if not urlparse.urlparse(link).scheme: - link = urlparse.urljoin("https://docs.google.com/", link) - - direct_link = self.direct_link(link, False) - if not direct_link: - self.html = self.load(link) - else: - self.link = direct_link - break + self.link = direct_link + break getInfo = create_getInfo(GoogledriveCom) |