解析俄语站点编码错误

时间:2018-08-14 15:26:30

标签: python python-3.x parsing encoding beautifulsoup

解析网站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₽'

面对谁,如何解决?谢谢!

1 个答案:

答案 0 :(得分:2)

我认为您想要的是:

parse = result.text