爬取https://www.yanyunxiaoshuo.com/xs/228367/92679328.html网站的文本
时间: 2023-12-02 15:43:21 浏览: 160
抽取网页文本
以下是爬取https://www.yanyunxiaoshuo.com/xs/228367/92679328.html网站的文本的Python代码:
```python
import requests
from bs4 import BeautifulSoup
url = 'https://www.yanyunxiaoshuo.com/xs/228367/92679328.html'
response = requests.get(url)
soup = BeautifulSoup(response.content, 'html.parser')
text = soup.find('div', class_='novelcontent').get_text()
print(text)
```
运行上述代码,即可输出该网页的文本内容。
阅读全文