![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
爬虫
JupiterChen
前华为er
展开
-
python 抓取https豆瓣电影信息
1、豆瓣网址为https,python需要模拟浏览器行为,添加请求头信息, headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/51.0.2704.63 Safari/537.36'} 2、打开开发者工具,对信息进行提取 2.1定位到电影信息头,先把关注的信息提取出来 tab...原创 2020-07-31 15:38:54 · 372 阅读 · 0 评论 -
python 抓取城市7日天气
1、首先打开气象网址,http://www.weather.com.cn/weather/101190101.shtml,打开开发者工具, 1.1可以看到7日的天气所在位置: 1.2 具体每日的天气属性 ,在li class中, 2、使用 python库函数获取网页信息 url = 'http://www.weather.com.cn/weather/101190101.shtml' webpage = req.urlopen(url) # 根据超链访问链接的网页 data = webpa.原创 2020-07-31 10:59:07 · 758 阅读 · 0 评论