首先需要安装Geocoder库: pip install geocoder. 然后,使用以下代码可以获取当前电脑的位置: import geocoder g = geocoder.ip('me') print(g.latlng). 代码解释:.
確定! 回上一頁