D
D
devpy142020-10-27 09:11:41
Python
devpy14, 2020-10-27 09:11:41

Why doesn't soup see element element from page('div')?

5f97ba5b3858f589288787.png
There is a trace. code:
import requests
from bs4 import BeautifulSoup

source = requests.get(' https://store.playstation.com/en-us/product/EP9000... ').text
soup = BeautifulSoup(source, 'lxml')

availability = soup.find('div', class_='price-availability').text

'availability' returns None, although there is a div with this class on the page. I tried another way: get all the text from the div tag of class 'large-9 columns pdp__right-content', and I get all the text, except for what lies in the div of class 'price-availability'. Then I think to get a div of the class '__desktop-presentation__product-detail__carousel__9deb5 ember-view', but soup does not see it either (in this div, if, there is a video)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question