I just started python recently and as a project ive been asked to learn how to scrape data from websites but im confused because im even newer to html, so when i am doing this in python
price_box = soup.find('div', attrs={'class':'price'})
i dont see where the class name is shown as simply 'price' for the price of a stock on https://www.bloomberg.com/quote/SPX:IND.
to me, the class is defined as follows
span class="priceText__1853e8a5">2,711.66
can someone explain to me what im missing or where my mistake is?
EDIT: ive been using this website to help, and i just copied the code across and it works, but when i inspect element to see for myself i dont see whats happening.
https://medium.freecodecamp.org/how-to-scrape-websites-with-python-and-beautifulsoup-5946935d93fe