解析网站时编码有问题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₽'
谁遇到过,如何解决?谢谢!
最佳答案
我认为你想要的是:
parse = result.text
关于python - 解析俄语站点编码错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51844897/