Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gamesdb/api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import urllib
import requests
import xml.etree.ElementTree as ET
from urlutils import urlencode_no_plus

Expand Down Expand Up @@ -60,10 +60,10 @@ def make_call(api_url, query_args=None):
# APIException, passing forward the pages contents (which generally gives some indication of the error.
if query_args is not None:
get_params = urlencode_no_plus.urlencode_no_plus(query_args)
response = urllib.urlopen(api_url+'%s' % get_params)
response = requests.get(api_url+'%s' % get_params)
else:
response = urllib.urlopen(api_url)
page = response.read()
response = requests.get(api_url)
page = response.text.encode('ascii', 'ignore')

# Make sure the XML Parser doesn't return a ParsError. If it does, it's probably and API Issue, so raise an
# exception, printing the response from the API call.
Expand Down