From 9b860d0d33cd847d14ba88053976ed47f8f16ac2 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 5 Oct 2014 10:23:56 +0200 Subject: [PATCH] urlencode --- ox/web/imdb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ox/web/imdb.py b/ox/web/imdb.py index 6103fdb..993cc9c 100644 --- a/ox/web/imdb.py +++ b/ox/web/imdb.py @@ -6,7 +6,7 @@ import re import time import unicodedata -from six.moves import urllib +from six.moves.urllib.parse import urlencode from six import string_types from .. import find_re, strip_tags, decode_html @@ -665,7 +665,7 @@ def get_movie_by_title(title, timeout=-1): params['q'] = unicodedata.normalize('NFKC', params['q']).encode('latin-1') except: params['q'] = params['q'].encode('utf-8') - params = urllib.urlencode(params) + params = urlencode(params) url = "http://akas.imdb.com/find?" + params data = read_url(url, timeout=timeout, unicode=True) #if search results in redirect, get id of current page @@ -741,7 +741,7 @@ def get_movie_id(title, director='', year='', timeout=-1): params['q'] = unicodedata.normalize('NFKC', params['q']).encode('latin-1') except: params['q'] = params['q'].encode('utf-8') - params = urllib.urlencode(params) + params = urlencode(params) url = "http://akas.imdb.com/find?" + params #print url