yahoo-finance

Scraping stock price from Yahoo Finance using Python & BeautifulSoup

Scraping stock price from Yahoo Finance using Python & BeautifulSoup Question: I’m trying to scrape stock price from Yahoo Finance using Python and BeautifulSoup. However, I’m not able to fetch the tag having a specific data-reactid attribute (See the screenshot). Please help me. Code: def getCurrentPrice(self, stockSymbol): #stockSymbol is : MSFT for Microsoft url = …

Total answers: 2

Downloading multiple stocks at once from Yahoo Finance

Downloading multiple stocks at once from Yahoo Finance Question: I have a question about the function of Yahoo Finance using the pandas data reader. I’m using for months now a list with stock tickers and execute it in the following lines: import pandas_datareader as pdr import datetime stocks = ["stock1","stock2",….] start = datetime.datetime(2012,5,31) end = …

Total answers: 5

Python pandas datareader no longer works for yahoo-finance changed url

Python pandas datareader no longer works for yahoo-finance changed url Question: Since yahoo discontinued their API support pandas datareader now fails import pandas_datareader.data as web import datetime start = datetime.datetime(2016, 1, 1) end = datetime.datetime(2017, 5, 17) web.DataReader(‘GOOGL’, ‘yahoo’, start, end) HTTPError: HTTP Error 401: Unauthorized is there any unofficial library allowing us to temporarily …

Total answers: 8

Python URL Request Yahoo API

Python URL Request Yahoo API Question: I wrote this script that uses ystockquote-master to scrape the Yahoo Finance API for price and market cap. It is very simple and works well on my pc, however when I try to use it on my friends mac I get an error. It is a very long one …

Total answers: 1

WebScraping with BeautifulSoup or LXML.HTML

WebScraping with BeautifulSoup or LXML.HTML Question: I have seen some webcasts and need help in trying to do this: I have been using lxml.html. Yahoo recently changed the web structure. target page; http://finance.yahoo.com/quote/IBM/options?date=1469750400&straddle=true In Chrome using inspector: I see the data in //*[@id=”main-0-Quote-Proxy”]/section/section/div[2]/section/section/table then some more code How Do get this data out into a …

Total answers: 4