📜  使用 python 代码示例跟踪电话号码位置

📅  最后修改于: 2022-03-11 14:46:05.527000             🧑  作者: Mango

代码示例1
# install package:
pip install phonenumbers

# code:
import phonenumbers
from phonenumbers import geocoder
from phonenumbers import carrier

number = '+XXXXXXXXXX'
ch_number = phonenumbers.parse(number, "CH")
print(geocoder.description_for_number(ch_number, "en"))
service_provider = phonenumbers.parse(number, "RO")
print(carrier.name_for_number(service_provider, "en"))