D
D
Dazai2021-05-09 18:39:02
Python
Dazai, 2021-05-09 18:39:02

How to get only the price?

Hello! I need to get only the price.
6098016e10fb5743269663.png
Having tried to get it through Xpath, I get only a full block of text, namely: From 0.71 rub.
Sold in the last 24 hours: 113. All I need is the price. And don’t go out in a different way, because the tree looks like this:
609802074bfdd560960829.png
Tell me what you can

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-05-09
@DazaiCoder

You can just rip it out regularly

import re
price = re.search('От ([0-9,]+)', text).group(1)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question