解析俄语站点编码

2024-09-28 05:19:29 发布

您现在位置:Python中文网/ 问答频道 /正文

解析站点https://beton24.ru/sochi/beton/时编码有问题

from urllib.request import urlopen
from bs4 import BeautifulSoup
html = urlopen('https://beton24.ru/sochi/beton/')
bs = BeautifulSoup(html.read())
result = bs.findAll("span", "catalog-index__link-text")[1]
parse = str(result)

为了得到混凝土的价格,我将结果转换为str,它变成'from\xa03\u2009836\xa0₽'

面对谁,如何解决?谢谢您!你知道吗


Tags: fromhttpsimport编码bs站点htmlru

热门问题