D
D
DokinsKING2021-05-03 15:32:17
Python
DokinsKING, 2021-05-03 15:32:17

I'm trying to get the price, but something doesn't work?

I seem to be doing everything right, span the count class and pulling out the text from there, but for some reason he writes that this does not exist608fed26f07d6417065126.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yupiter7575, 2021-05-03
@DokinsKING

bs4 he is. Pull out a little, first the diva, then the smaller diva, then in this diva it’s already spanned

E
Evgeny Tarovik, 2021-05-03
@taro_z

parsel (for scrapy / lxml almost exactly the same):

selector.xpath('//span[@class="count"]/text()').get()

or in more detail, so as not to catch somewhere earlier:
selector.xpath('//aside[@class="task__column_price"]/div/span[@class="count"]/text()').get()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question