S
S
sound9012019-05-16 20:05:53
Python
sound901, 2019-05-16 20:05:53

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)

5cdd97b895c75449866738.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2019-05-16
@saund901

instead of
@data-url

R
Roman Fov, 2019-05-16
@Roman-Fov

So
Or if it doesn't work, then so
The last one is the meaning

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question