百度文库只能爬取到第一页,第二页的内容在Network中找不到
url:https://wenku.baidu.com/view/609b5c42daef5ef7bb0d3c3c.html
我用的python3
import requests
from bs4 import BeautifulSoup
headers = {'User-Agent':'Googlebot'}
url = str(input('url: '))
res = requests.get(url,headers=headers)
bea = BeautifulSoup(res.text,'html.parser')
bea = bea.find_all('div',id='pageNo-2')
print(bea)