https://www.cnblogs.com/YangQingHong/p/10981017.html
'两种方式'
import urllib
status=urllib.urlopen("//www.jb51.net").code
print status
import requests
code=requests.get("//www.jb51.net").status_code
print code
https://www.cnblogs.com/YangQingHong/p/10981017.html
'两种方式'
import urllib
status=urllib.urlopen("//www.jb51.net").code
print status
import requests
code=requests.get("//www.jb51.net").status_code
print code
本文标题:python爬虫代码中_获取状态码
本文链接:https://www.haomeiwen.com/subject/kbllxrtx.html
网友评论