imbrianj / switchBoard

Control of Internet connected devices within a given network via web interface.
MIT License
201 stars 53 forks source link

Change stock source #39

Closed imbrianj closed 9 years ago

imbrianj commented 9 years ago

YQL feed for stock data has been retired. Need to find a new API to use. Considering google: google.igoogle.stock

imbrianj commented 9 years ago

Looks like google may also be shuttered: http://googlecode.blogspot.com/2011/05/spring-cleaning-for-some-of-our-apis.html

imbrianj commented 9 years ago

I think I may be able to use a query like this: SELECT * FROM data.html.cssselect WHERE url='http://finance.yahoo.com/quotes/YHOO,TSLA' AND css='.yfi-quotes-table tbody'

But it gives a whole lot of markup structure that I cannot omit - otherwise, I'll lose the relationship between each data component.

This will also require parsing JSON that is tightly coupled to the markup on the page - so if it's changed, the controller will also need to be updated.

Right now, I'm not seeing any better means to freely grab live stock data.

imbrianj commented 9 years ago

https://github.com/imbrianj/switchBoard/commit/8ea75ef1231d46235bdd620e47a17e08b898a03c

This'll work for now.