url="http://www.weather.com.cn/weather/101280601.shtml"headers={"User-Agent":"Mozilla/5.0 (Windows; U; Windows NT 6.0 x64; en-US; rv:1.9pre) Gecko/2008072421 Minefield/3.0.2pre"}req=urllib.request.Request(url,headers=headers)data=urllib.request.urlopen(req)data=data.read()其中headers的作用是为了模拟浏览器
选项:
A:正确;
B:错误
发布时间:2024-04-14 21:07:26