先上圖
結(jié)果
1.導(dǎo)入requests
2.導(dǎo)入beautifulsoup
3.用requests獲取網(wǎng)站get方法
4.設(shè)置編碼encoding=‘utf-8’
5.傳進(jìn)beautifsoup 加入‘html.parser’
6.選擇html
7.用【0】去掉list 用.text得到文字
1.導(dǎo)入requests
2.導(dǎo)入beautifulsoup
3.用requests獲取網(wǎng)站get方法
4.設(shè)置編碼encoding=‘utf-8’
5.傳進(jìn)beautifsoup 加入‘html.parser’
6.選擇html
7.用【0】去掉list 用.text得到文字