爬取网址http://hu.yixue99.com/2020/kszx_0205/27792.html
代码如下:
1 import requests 2 from bs4 import BeautifulSoup 3 4 url="http://hu.yixue99.com/2020/kszx_0205/27792.html" 5 kv = {'user-agent': 'Mozilla/5.0'} 6 7 #爬取总览信息 8 def content(): 9 url = "http://hu.yixue99.com/2020/kszx_0205/27792.html" 10 r=requests.get(url,headers=kv)