Answer the question
In order to leave comments, you need to log in
How to get data-url text in a tag?
Can you please tell me how to get the value in 'data-url'?
fname = 'Код Да Винчи'
url = f'https://www.kinopoisk.ru/index.php?kp_query={fname}'
page = requests.get(url, headers=HEADERS)
tree = html.fromstring(page.content)
mbu = tree.xpath("//div[@class='element most_wanted']//div[@class='info']//p//text()")
print(mbu)
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