Benny- / Yahoo-ticker-symbol-downloader

A web scraper for ticker symbols from yahoo finance
https://pypi.python.org/pypi/Yahoo-ticker-downloader/
Other
247 stars 87 forks source link

Which markets are included? Fail to build reppy dependecy on OSX #49

Closed alexgrca closed 5 years ago

alexgrca commented 5 years ago

Hi Benny, thanks for your script. I have the same issues while installing reppy and I used the old version of yahoo ticker download as I read in other post.

I would like to ask you if the script in Europe is limited to germany and france? Would it be possible to download more EU countries?? Spain, Italy, Portugal, Netherlands, Belgium, Finland, Austria for instance?

Thanks a lot!

Benny- commented 5 years ago

Ticker symbols are traded on an exchange. A quick look in the output reveals some ticker symbols to be associated with AMS (or Amsterdam Stock Exchange, located in The Netherlands). So yes, it includes an exchange in at least one of your listed countries. I do not have information about which exchanges are associated with specific countries. One will have to do research in order to obtain this information.

But, it get even more complicated. Some ticker symbols are associated with a specific country but are exchanged on an exchange of another country! A great example is Royal Dutch Shell PLC. Which is a Dutch company (I hope, haha. You can't ever be sure in today's globalized market) but exchanged on the Londen stock exchange. I do not possess this information either.

An API might exist for more information about the ticker symbols or the exchanges. If something like that exist please raise it here and I might incorporate it into Yahoo-ticker-downloader.

Does this answer your question?

alexgrca commented 5 years ago

Hello Benny, thanks a lot for your help. I have seen that your in your output appears stocks from the exchanges I mentioned before. Unfortunately I am getting some errors and is not working:

  1. I cannot install the last version of yahoo-ticker-symbol-downloader because of the reppy issue I have read in other posts: " Failed building wheel for reppy"

  2. I have downloaded the previous version and try to download the stocks from the exchange MCE (extracted from your output example) and I am getting the following errors.

I think this tool is amazing. Do you have any idea about this errors? Are you running it in linux or mac? I am mac user.

Thanks a lot

A exception occurred while downloading. Suspending downloader to disk Successfully saved download state Try removing {type}.pickle file if this error persists Issues can be reported on https://github.com/Benny-/Yahoo-ticker-symbol-downloader/issues Traceback (most recent call last): File "/anaconda3/bin/YahooTickerDownloader.py", line 161, in main() File "/anaconda3/bin/YahooTickerDownloader.py", line 111, in main downloadEverything(downloader, tickerType, args.insecure, args.sleep, args.pandantic, market) File "/anaconda3/bin/YahooTickerDownloader.py", line 46, in downloadEverything symbols = downloader.nextRequest(insecure, pandantic, market) File "/anaconda3/lib/python3.6/site-packages/ytd/SymbolDownloader.py", line 109, in nextRequest json = self._fetch(insecure, market) File "/anaconda3/lib/python3.6/site-packages/ytd/SymbolDownloader.py", line 65, in _fetch resp.raise_for_status() File "/anaconda3/lib/python3.6/site-packages/requests/models.py", line 939, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://finance.yahoo.com/_finance_doubledown/api/resource/finance.yfinlist.symbol_lookup;m=all;b=0;s=a;t=S;p=1?device=console&returnMeta=true

Benny- commented 5 years ago

Which Macintosh and xcode are you using? Can you try the latest version?

alexgrca commented 5 years ago

Hi Benny, I am using MacOs Mojave 10.14. I am not an expert of programing.. I just install the package through the console "pip install yahoo...." and I am getting the error about reppy.

Regarding xcode... I am not sure which version do I have, if I have one because I am not using it.

Benny- commented 5 years ago

Okay, have you tried all solutions in https://github.com/seomoz/reppy/issues/45 ? Can you tell which work or don't work? If that still fails I'll have to replace reppy by a pure python version.

Benny- commented 5 years ago

( Problems with reppy also happened on windows. https://github.com/Benny-/Yahoo-ticker-symbol-downloader/issues/46 )

alexgrca commented 5 years ago

Hi Benny, thanks for your answer. When I was having this problem I searched a lot on google and I also found the link you are showing. I tried in the terminal: CFLAGS=-stdlib=libc++ pip install reppy but I was still getting the same problems.

The other solutions are neither working.

Benny- commented 5 years ago

Changing the dependency to a pure python version is the best option. It is planned, but there is no ETA when this is finished.

alexgrca commented 5 years ago

Thanks a lot Benny! I will check it regularly! Just answer this post when you change it to receive a notification! :P Thanks for your help!!!