【Python|爬虫】工具库
2022-11-29 本文已影响0人
盐果儿
拿到一条你需要爬取的网页url,让urllib发送请求,获得对应的响应,如果响应是一个html文件,那就再丢给beautifulsoup进行解析。
import urllib.request
from bs4 import BeautifulSoup
拿到一条你需要爬取的网页url,让urllib发送请求,获得对应的响应,如果响应是一个html文件,那就再丢给beautifulsoup进行解析。
import urllib.request
from bs4 import BeautifulSoup