ip2location related minor fixes
This commit is contained in:
parent
c597191892
commit
4730dce9a4
1 changed files with 1 additions and 1 deletions
|
|
@ -96,7 +96,7 @@ def ip2location(ip_addr):
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
ip2location_response = requests\
|
ip2location_response = requests\
|
||||||
.get('http://api.ip2location.com/?ip=%s&key=%s&package=WS10' \
|
.get('http://api.ip2location.com/?ip=%s&key=%s&package=WS3' \
|
||||||
% (ip_addr, IP2LOCATION_KEY)).text
|
% (ip_addr, IP2LOCATION_KEY)).text
|
||||||
if ';' in ip2location_response:
|
if ';' in ip2location_response:
|
||||||
open(cached, 'w').write(ip2location_response)
|
open(cached, 'w').write(ip2location_response)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue