簡(jiǎn)單爬蟲筆記
步驟:
>導(dǎo)包
????pip3 install requests
????pip3 install bs4
>偽裝成瀏覽器請(qǐng)求資源

>分析靜態(tài)資源標(biāo)簽
????以阿B首頁分區(qū)為例

要爬取的是div標(biāo)簽下的class為channel-items_left的標(biāo)簽里的a標(biāo)簽里target為_blank的內(nèi)容需要兩個(gè)循環(huán)
>爬

步驟:
>導(dǎo)包
????pip3 install requests
????pip3 install bs4
>偽裝成瀏覽器請(qǐng)求資源
>分析靜態(tài)資源標(biāo)簽
????以阿B首頁分區(qū)為例
要爬取的是div標(biāo)簽下的class為channel-items_left的標(biāo)簽里的a標(biāo)簽里target為_blank的內(nèi)容需要兩個(gè)循環(huán)
>爬