From 05d258d98dd8c2faf0b769840fa1e3c4acccdce8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 03:25:14 +0200 Subject: Fix and improve 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 --- module/plugins/hoster/DlFreeFr.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/DlFreeFr.py') diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py index f0a8aa933..7bebb62b5 100644 --- a/module/plugins/hoster/DlFreeFr.py +++ b/module/plugins/hoster/DlFreeFr.py @@ -16,9 +16,10 @@ class CustomBrowser(Browser): def load(self, *args, **kwargs): post = kwargs.get("post") - if not post: - if len(args) > 2: - post = args[2] + + if post is None and len(args) > 2: + post = args[2] + if post: self.http.c.setopt(pycurl.FOLLOWLOCATION, 0) self.http.c.setopt(pycurl.POST, 1) @@ -27,6 +28,7 @@ class CustomBrowser(Browser): self.http.c.setopt(pycurl.FOLLOWLOCATION, 1) self.http.c.setopt(pycurl.POST, 0) self.http.c.setopt(pycurl.CUSTOMREQUEST, "GET") + return Browser.load(self, *args, **kwargs) -- cgit v1.2.3