Python

Real Time Stock Price Scraping with Python, Beautiful Soup And Requests from Yahoo Finance



This video explains how you can use python and Beautiful Soup scrapper to do some webscraping. Using a simple example of capturing stock price data in real time, and continuously updating it withouot any pause. After watching the video, you will have an idea of how useful web scraping can be for your own purposes and you will able to create your own web scrapper to start your trade and earn your cash.

To capture the stock price, I used Python and Beautiful Soup. I am getting free stock…

Similar Posts

23 thoughts on “Real Time Stock Price Scraping with Python, Beautiful Soup And Requests from Yahoo Finance
  1. Hello, i keep getting this as an output
    code:
    price = soup.find_all('div', {'class':'_1W-XI _1HTy3 _26ebt _1bPZs'})

    print(price)

    output:
    runfile('C:/Users/12053/Desktop/2020 Folder/Victors Program/untitled0.py', wdir='C:/Users/12053/Desktop/2020 Folder/Victors Program')

    []

    In [20]:

  2. Hi for this portion of the code:
    price=soup.find_all('div', {'class': 'My(6px) Pos(r) smartphone_Mt(6px)'})[0].find('span').text

    if I run the code for a long period of time, I will get Index Error, (list index out of range). May I know why is this the case and how to fix it. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *