December 14 Yahoo Finance Scraper | ||||
---|---|---|---|---|
| ||||
https://forum.dlang.org/post/temmuvdikcuffkymihun@forum.dlang.org Hello again. This scraper worked for me since 2020 but apparently Yahoo decided to change some of the API and it stopped working a while back. Last week I worked on updating it and it seems to work again. I haven't done a great job at testing the code so be careful with it but it seems to work for me. I can probably add a few more things if anyone's interested in it. https://github.com/SelimOzel/YahooFinanceD Best, Selim |
December 17 Re: Yahoo Finance Scraper | ||||
---|---|---|---|---|
| ||||
Posted in reply to Selim Ozel | On Thursday, 14 December 2023 at 00:31:34 UTC, Selim Ozel wrote: > https://forum.dlang.org/post/temmuvdikcuffkymihun@forum.dlang.org > > Hello again. This scraper worked for me since 2020 but apparently Yahoo decided to change some of the API and it stopped working a while back. Last week I worked on updating it and it seems to work again. I haven't done a great job at testing the code so be careful with it but it seems to work for me. I can probably add a few more things if anyone's interested in it. > > https://github.com/SelimOzel/YahooFinanceD > > Best, > Selim ``` user@debian:~$ dub run yahoofinanced:example-csv Warning Package 'yahoofinanced:example-csv' was neither found locally nor online. user@debian:~$ dub run yahoofinanced:example-dataframe Warning Package 'yahoofinanced:example-dataframe' was neither found locally nor online. user@debian:~$ ``` I think README fails to mention that you need to clone the repo, and do it from the repo directory. On a good noite, it looks like it works with gdc compiler out of the box. Nice. Minor issues: ``` user@debian:~/YahooFinanceD$ dub run yahoofinanced:example-csv Building package yahoofinanced:example-csv in /home/user/YahooFinanceD/ Starting Performing "debug" build using /usr/bin/gdc for x86_64. Building yahoofinanced:example-csv 1.1.1: building configuration [application] Running example-csv Retrieveing MSFT between 1544598000 and 1591772400. Using query: https://query1.finance.yahoo.com/v7/finance/download/MSFT?period1=1544598000&period2=1591772400&interval=1d&events=divs&includeAdjustedClose=true Retrieveing AAPL between 1544598000 and 1591772400. Using query: https://query1.finance.yahoo.com/v7/finance/download/AAPL?period1=1544598000&period2=1591772400&interval=1d&events=divs&includeAdjustedClose=true Retrieveing AMZN between 1544598000 and 1591772400. Using query: https://query1.finance.yahoo.com/v7/finance/download/AMZN?period1=1544598000&period2=1591772400&interval=1d&events=divs&includeAdjustedClose=true Retrieveing GM between 1544598000 and 1591772400. Using query: https://query1.finance.yahoo.com/v7/finance/download/GM?period1=1544598000&period2=1591772400&interval=1d&events=divs&includeAdjustedClose=true Retrieveing F between 1544598000 and 1591772400. Using query: https://query1.finance.yahoo.com/v7/finance/download/F?period1=1544598000&period2=1591772400&interval=1d&events=divs&includeAdjustedClose=true Retrieveing FCAU between 1544598000 and 1591772400. Using query: https://query1.finance.yahoo.com/v7/finance/download/FCAU?period1=1544598000&period2=1591772400&interval=1d&events=history&includeAdjustedClose=true HTTP request returned status code 404 () user@debian:~/YahooFinanceD$ ``` Maybe ignore 404 errors, and continue with the code. My guess the `FCAU` is no longer listed. |
Copyright © 1999-2021 by the D Language Foundation