|
@@ -16,6 +16,7 @@ class IPQuery:
|
|
|
self.path = '/ip'
|
|
|
|
|
|
self.district = None
|
|
|
+ self.countryId = None
|
|
|
|
|
|
param = 'ip=' + ip
|
|
|
url = self.host + self.path + '?' + param
|
|
@@ -29,7 +30,9 @@ class IPQuery:
|
|
|
if res_data['ret'] == 200:
|
|
|
district = res_data['data']['district']
|
|
|
city = res_data['data']['city'] + '市'
|
|
|
+ country_id = res_data['data']['country_id']
|
|
|
self.district = district if district else city
|
|
|
+ self.countryId = country_id
|
|
|
|
|
|
|
|
|
class WeatherInfo:
|