问题标签 [python-phonenumber]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
57 浏览

python - 电话号码中的 country_name_for_number 不返回任何内容

我想通过 Python 使用电话号码访问国家/地区名称。但是对于某些输入数据它不返回任何内容,我该如何解决这个问题?在 Phonenumbers 文档中,我发现了以下可疑评论:

如果已经发现该号码对一个地区有效,那么我们不知道它属于哪个地区,所以我们什么也不返回。