diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-18 17:20:02 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-10-18 17:20:02 +0200 |
commit | 728b62cc02e99888072ddb356b83f3e21bb902c7 (patch) | |
tree | 870104e254ea598d563cdf74d6beb37dd40a9adf | |
parent | [BasePlugin] Extend hoster Http (diff) | |
download | pyload-728b62cc02e99888072ddb356b83f3e21bb902c7.tar.xz |
[OneFichierCom] Fix handle_premium routine
-rw-r--r-- | module/plugins/hoster/OneFichierCom.py | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index 8de529643..259ed7fe1 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -76,27 +76,11 @@ class OneFichierCom(SimpleHoster): else: info = {'status' : 8, - 'error' : _("Too many redirects")} + 'error' : _("Too many redirects")} return info - def handle_direct(self, pyfile): - redirect = pyfile.url - for i in xrange(self.get_config("maxredirs", plugin="UserAgentSwitcher")): - - headers = self.load(redirect, just_header=True) - if 'location' in headers and headers['location']: - self.log_debug("Redirect #%d to: %s" % (i, redirect)) - redirect = headers['location'] - else: - if 'content-type' in headers and headers['content-type'] == "application/octet-stream": - self.link = pyfile.url - break - else: - self.fail(_("Too many redirects")) - - def handle_free(self, pyfile): self.check_errors() @@ -114,7 +98,7 @@ class OneFichierCom(SimpleHoster): def handle_premium(self, pyfile): - self.download(pyfile.url, post={'dl': "Download", 'did': 0}) + self.download(pyfile.url, post={'did': 0, 'dl_no_ssl': "on"}) getInfo = create_getInfo(OneFichierCom) |