手机号码查询归属地

# -*- coding: utf-8 -*-
# @Time : 2020/8/12 19:44
# @Author : Mr.Hei
from phone import Phone

def mobile(mobile):
info = Phone().find(mobile)
print(info)
try:
phone = info[‘phone‘]
province = info[‘province‘]
city = info[‘city‘]
zip_code = info[‘zip_code‘]
area_code = info[‘area_code‘]
phone_type = info[‘phone_type‘]
except:
print(‘none‘)
if __name__ == "__main__":
fp=open("test.txt","r")
print(fp)
con=fp.readlines()

for i in con:
mobile(i)
###遇到的问题
assert 7 <= len(phone_num) <= 11
在phone.py的源码里 有这么一行 判读电话号码长度,目前没有办法避开,临时注释即可

手机号码查询归属地

上一篇:AutoMapper的配置


下一篇:requests.exceptions.ConnectionError: HTTPSConnectionPool(host='appts.xxx.com%20', port=443):