Searched for a specific item:
game_descriptions = html.cssselect('#game_area_description')[0] As a result, I received such a block:
<div id="game_area_description" class="game_area_description"> <strong>Π‘Π°ΠΌΠ°Ρ ΠΏΠΎΠΏΡΠ»ΡΡΠ½Π°Ρ ΠΈΠ³ΡΠ° Π² Steam</strong> <br>ΠΠΆΠ΅Π΄Π½Π΅Π²Π½ΠΎ ΠΌΠΈΠ»Π»ΠΈΠΎΠ½Ρ ΠΈΠ³ΡΠΎΠΊΠΎΠ² ΠΏΠΎ Π²ΡΠ΅ΠΌΡ ΠΌΠΈΡΡ Π²ΡΡΡΠΏΠ°ΡΡ Π² Π±ΠΈΡΠ²Ρ ΠΎΡ Π»ΠΈΡΠ° ΠΎΠ΄Π½ΠΎΠ³ΠΎ..... How to get all the text with html attributes?
.text prints blank lines
Update:
import lxml.html def get_html(request): return lxml.html.fromstring(request.text) html = get_html(r) game_descriptions = html.cssselect('#game_area_description')[0]
''.join([html.tostring(child) for child in game_descriptions.iterchildren()])- gil9redhtmlwho?from lxml import html? Add a minimal reproducible example to the question so as not to play riddles - gil9red