1、淘宝网((精确到省份)
API地址: http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=手机号码
2、百度(精确到地市)
API地址:http://mobsec-dianhua.baidu.com/dianhua_api/open/location?tel=手机号码
import json
import urllib2
mobile = 13923781234
html = urllib2.urlopen(r'http://mobsec-dianhua.baidu.com/dianhua_api/open/location?tel='+str(mobile)+'\'')
hjson = json.loads(html.read())
# json.load可以将json串解析成dict
print hjson
print hjson['response'][str(mobile)]['detail']['area'][0]['city']