d3an / finviz

Go API for Finviz
https://github.com/d3an/finviz/wiki
MIT License
20 stars 3 forks source link

Panic if ticker not available #79

Closed smjure closed 2 years ago

smjure commented 2 years ago

I am requesting quotes client.GetQuotes([]symbols) for a bunch of tickers and get panic if a ticker is not available in FinViz, e.g. ticker SHAC is not..  error received while scraping quote for 'SHAC': error getting url: 'https://finviz.com/quote.ashx?t=SHAC&ty=c&p=d&b=1', status code: '404' I could catch the error, remove the ticker and pull again, but that could be much overhead, specially from FinViz point of view. Could this be fixed internally so the program does not panic but throws warning instead that a ticker is not available?

d3an commented 2 years ago

Read about the changes here.