Answer the question
In order to leave comments, you need to log in
How to convert unicode sequences to readable characters?
There is a line like "\u0421\u0438\u043d\u0438\u0439". How to get the string "Blue" from it?
Thanks
UPD: I'll ask the question differently:
There is a real piece of code
import urllib.request, lxml.html as html
src = urllib.request.urlopen("http://ekopups.ua/detskie-pelenki")
encod=src.headers.get_content_charset()
if encod==None: encod="cp1251"
print (encod)
src = src.read()
#.decode(encod)
print (src)
src = html.document_fromstring(src)
res=src.xpath(".//div[@class='title-feedback']/text()")
print (res)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question