标签:beautiful 网页 bs4 htm job rom imp requests 获取
import requests
from bs4 import BeautifulSoup
url = ‘http://fj.huatu.com/zt/2019zwb/‘
def sss(url):
reque = requests.get(url)
reque.encoding=reque.apparent_encoding
return reque.text
html = sss(url)
soup = BeautifulSoup(html,‘html.parser‘)
print(job = soup.select(‘div>h2>ul>li‘))
标签:beautiful 网页 bs4 htm job rom imp requests 获取
原文地址:https://www.cnblogs.com/ztld/p/12543143.html