从mysql数据库获取电话号码,查询归属地并插入到数据库 #!/usr/bin/python # -*- coding: utf-8 -*- import json, urllib, sys, pymysql from urllib import urlencode, urlopen reload(sys) sys.setdefaultencoding('utf8') #调用接口,获取结果为二维字典 def getPageCode(url, params): params = urlencode…