Skip to content

建议优化下ip-api.com的请求方式 #17

Description

@Waterman1997

建议优化下写法

ip_api=urllib2.urlopen(r'http://ip-api.com/json')

例如

try:
urllib2.urlopen(r'http://ip-api.com/json')
excepturllib2.URLErrorase:
printe.code

原因是我的pi-hole默认屏蔽规则里有这个域名,so,巴啦啦报错

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions