【发布时间】:2020-05-26 11:21:01
【问题描述】:
我正在尝试使用 BeautifulSoup 抓取 URL。
下面是我的代码:
url= 'https://www.clinicspots.com/what-is-the-knee-replacement-surgery-cost-in-india'
response = requests.get(url)
s4 = BeautifulSoup(response.content, 'html.parser')
s4
此外,我需要执行s4.title.text。
这给了我一些奇怪的输出(似乎是用中文写的)
我尝试手动打开 URL,这似乎工作正常。
我不确定如何解决这个问题。请提出建议。
编辑#1:下面是输出的屏幕截图:
【问题讨论】:
-
它给了你什么?你必须向我们展示!否则我们不是这里的翻译服务。您的问题与编程语言有关吗?
标签: python-3.x web-scraping beautifulsoup