2024-09-28 21:32:30 发布
网友
我想用python从HTML网站上获取一个片段。你知道吗
例如,从urlhttp://steven-universe.wikia.com/wiki/Steven_Universe_Wiki我想得到“下一集”框中的文本,作为字符串。我怎样才能得到它?你知道吗
首先从here下载BeautifulSoup最新版本 以及来自here的请求
from bs4 import BeautifulSoup import requests con = requests.get(url).content soup = BeautifulSoup(con) text = soup.find_all("a",href="/wiki/Gem_Harvest").text; print(link)
首先从here下载BeautifulSoup最新版本 以及来自here的请求
相关问题 更多 >
编程相关推荐