使用https获取外部ip的简单库。
ipfinder的Python项目详细描述
这是一个通过https获取外部ip的简单python库。
- 示例:
导入ipfinder
link=ipfinder.ipfinder() link.updateIP() 打印(link.getip())
API参考号:
class IPFinder
- methods:
- IPFinder.seturl(string) - OPTIONAL - Set the URL of the IP lookup site. Site needs to return IP only. IPFinder.getip() - Returns IP address as a string. IPFinder.updateip() - Send connection request to get external IP.