-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a scraper for Yahoo Finance #3
Comments
We can use xpath query to scrape. //table[last()]//tr[last()-1]//td[2] |
Some info on the yahoo finance API: https://observablehq.com/@stroked/yahoofinance |
Also For company info and sec filings:
Other modules are:
Ex-dividend date comes from Cash on hand comes from |
The only thing I can't figure out how to get yet (which I need) is |
This comes down during the main response, so we can just URL fetch the analysis page. The json is populated in the reactjs |
I'm not entirely sure why, but doing a local test works fine. But porting the code to run on the server is not finding the string in the output.
|
Oh, it was a copy paste error. Of course :P |
Work mostly complete in 250485a. |
As of afa1844, the code is being used to calculate margin of safety. I still need to parse the current price from the quote and display that. |
Plenty of good data here too: https://stackoverflow.com/questions/44030983/yahoo-finance-url-not-working |
Quote scraping added in 155a766. The only thing that's needed (although I don't have an immediate use for it) is for fetching quoteSummary modules: #3 (comment) |
Started the implementation here: 5bf4a85 |
It seems like the parsing can be done along the lines of this:
This should produce a dictionary with keys for each module, and the results being the result. |
Reading data from a file, I confirmed this approach works:
|
Particularly useful for the analysis. URL =
https://finance.yahoo.com/quote/<symbol>/analysis
.Looking at the
Next 5 Years (per annum)
.The text was updated successfully, but these errors were encountered: