python爬虫代码中_获取状态码

'两种方式'

import urllib
status=urllib.urlopen("//www.jb51.net").code
print status

import requests
code=requests.get("//www.jb51.net").status_code
print code

猜你喜欢

转载自www.cnblogs.com/YangQingHong/p/10981017.html
今日推荐