I need to understand the craft of parsing) I'm just a beginner. The question is how to convert a string to a normal view.

response.xpath("//a[@class='eCatalogLinks_Link']/text()).extract_first() 

I get back

 u'\u041a\u043d\u0438\u0433\u0438' 
  • print(u'\u041a\u043d\u0438\u0433\u0438') - andreymal
  • python 2 branches? - Igor
  • one
    What is your task: print the text to the console? Save it to file? Send over the network? See the second half of the answer . If you don’t know what the string constants (unicode literals) look like in Python, then read some introductory tutorial so that you don’t stumble on basic things or waste time. - jfs

1 answer 1

It's pretty simple:

 text = u'\u041a\u043d\u0438\u0433\u0438' print(text) 

And the code will give the word:

 Книги