![](/img/trans.png)
[英]I'm facing a problem with my web scraping code I don't really know the problem is
[英]my web scraping does not work and i don t know what the problem is
import requests
from bs4 import BeautifulSoup
req = requests.get("https://www.arukereso.hu/mobiltelefon-c3277/")
soup = BeautifulSoup(req.content, "head")
print(soup.prettify())
假设你想要整个 html 内容(不确定你想用“head”实现什么):
尝试更换
soup = BeautifulSoup(req.content, "head")
和
soup = BeautifulSoup(req.content, "html.parser")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.