Skip to content

Commit

Permalink
Merge pull request #37 from LcTrKiD/master
Browse files Browse the repository at this point in the history
add encode utf-8 for location
  • Loading branch information
Mila432 authored Jul 17, 2016
2 parents a354a86 + c109dd0 commit a235e98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion public.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from geopy.geocoders import GoogleV3
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
from google.protobuf.internal import encoder

API_URL = 'https://pgorelease.nianticlabs.com/plfe/rpc'
LOGIN_URL = 'https://sso.pokemon.com/sso/login?service=https%3A%2F%2Fsso.pokemon.com%2Fsso%2Foauth2.0%2FcallbackAuthorize'
Expand Down Expand Up @@ -64,7 +65,7 @@ def set_location(location_name):
geolocator = GoogleV3()
loc = geolocator.geocode(location_name)

print('[!] Your given location: {}'.format(loc.address))
print('[!] Your given location: {}'.format(loc.address.encode('utf-8')))
print('[!] lat/long/alt: {} {} {}'.format(loc.latitude, loc.longitude, loc.altitude))
set_location_coords(loc.latitude, loc.longitude, loc.altitude)

Expand Down

0 comments on commit a235e98

Please sign in to comment.