import  urllib
url = "http://www.baidu.com"
try:
    status = urllib.urlopen(url).code
    print status
except:
    print {'result': 'false', 'msg': 'URL cannot access'}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2021-05-28
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2021-06-03
相关资源
相似解决方案