From f1e0ef87a4fc976be5d1f5ec4736c51bb0c51c7b Mon Sep 17 00:00:00 2001 From: masux Date: Sun, 21 Sep 2014 09:16:59 +0200 Subject: [PATCH] This fix qbittorrent/qBittorrent#1949 --- src/searchengine/nova/helpers.py | 6 +++--- src/searchengine/nova3/helpers.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/searchengine/nova/helpers.py b/src/searchengine/nova/helpers.py index 31d6a5de5..a73443f9e 100644 --- a/src/searchengine/nova/helpers.py +++ b/src/searchengine/nova/helpers.py @@ -22,7 +22,7 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -#VERSION: 1.33 +#VERSION: 1.34 # Author: # Christophe DUMEZ (chris@qbittorrent.org) @@ -64,7 +64,7 @@ def htmlentitydecode(s): def retrieve_url(url): """ Return the content of the url page as a string """ - req = urllib2.Request(url, headers) + req = urllib2.Request(url, headers = headers) response = urllib2.urlopen(req) dat = response.read() # Check if it is gzipped @@ -89,7 +89,7 @@ def download_file(url, referer=None): file, path = tempfile.mkstemp() file = os.fdopen(file, "w") # Download url - req = urllib2.Request(url, headers) + req = urllib2.Request(url, headers = headers) if referer is not None: req.add_header('referer', referer) response = urllib2.urlopen(req) diff --git a/src/searchengine/nova3/helpers.py b/src/searchengine/nova3/helpers.py index b3a27a606..f280dce4f 100644 --- a/src/searchengine/nova3/helpers.py +++ b/src/searchengine/nova3/helpers.py @@ -22,7 +22,7 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -#VERSION: 1.34 +#VERSION: 1.35 # Author: # Christophe DUMEZ (chris@qbittorrent.org) @@ -64,7 +64,7 @@ def htmlentitydecode(s): def retrieve_url(url): """ Return the content of the url page as a string """ - req = urllib.request.Request(url, headers) + req = urllib.request.Request(url, headers = headers) response = urllib.request.urlopen(req) dat = response.read() # Check if it is gzipped @@ -90,7 +90,7 @@ def download_file(url, referer=None): file, path = tempfile.mkstemp() file = os.fdopen(file, "wb") # Download url - req = urllib.request.Request(url, headers) + req = urllib.request.Request(url, headers = headers) if referer is not None: req.add_header('referer', referer) response = urllib.request.urlopen(req)