网页获取
2021-04-03 11:27
阅读:509
标签:beautiful 网页 bs4 htm job rom imp requests 获取 import requests url = ‘http://fj.huatu.com/zt/2019zwb/‘ html = sss(url) 网页获取 标签:beautiful 网页 bs4 htm job rom imp requests 获取 原文地址:https://www.cnblogs.com/ztld/p/12543143.html
from bs4 import BeautifulSoup
def sss(url):
reque = requests.get(url)
reque.encoding=reque.apparent_encoding
return reque.text
soup = BeautifulSoup(html,‘html.parser‘)
print(job = soup.select(‘div>h2>ul>li‘))
评论
亲,登录后才可以留言!