Page 3 of 3

Re: Simple Yahoo Price Scrape update

Posted: January 30th, 2018, 9:49 am
by kiloran
JMN2 wrote:
However, looking at the Python code, I can't understand what is the letter code that actually tells that the last price or close price is brought in? IIRC, Yahoo has various letter & number combos that represent previous close, and all kinds of information, for instance last price was l1, p was previous close, change c1, open o, day's low g, etc.
Since late last year, Yahoo have discontinued their Finance API which used these letter/number combinations. There is an alternative, which is much more complicated to use: http://lemonfoolfinancialsoftware.weebl ... nload.html

The replacement for Last Price l1 is regularMarketPrice
Previous close is regularMarketPreviousClose

--kiloran

Re: Simple Yahoo Price Scrape update

Posted: January 30th, 2018, 12:06 pm
by JMN2
kiloran wrote:
JMN2 wrote:
However, looking at the Python code, I can't understand what is the letter code that actually tells that the last price or close price is brought in? IIRC, Yahoo has various letter & number combos that represent previous close, and all kinds of information, for instance last price was l1, p was previous close, change c1, open o, day's low g, etc.
Since late last year, Yahoo have discontinued their Finance API which used these letter/number combinations. There is an alternative, which is much more complicated to use: http://lemonfoolfinancialsoftware.weebl ... nload.html

The replacement for Last Price l1 is regularMarketPrice
Previous close is regularMarketPreviousClose

--kiloran
...which seems to appear only once in the python code, change that and voila! Thank you.

Re: Simple Yahoo Price Scrape update

Posted: January 30th, 2018, 4:09 pm
by pochisoldi
kiloran wrote: Since late last year, Yahoo have discontinued their Finance API which used these letter/number combinations. There is an alternative, which is much more complicated to use: http://lemonfoolfinancialsoftware.weebl ... nload.html
But not as complicated or as slow as scraping a web page to get data.

Using the json data means that my perl cgi "funds scraper" web page now collects five FTSE quotes in about a second, compared to 10 seconds for my previous attempt.

And it means I can add "mucking around with json" to my CV as well.

Thanks for pointing me in the right direction.

PochiSoldi

Re: Simple Yahoo Price Scrape update

Posted: January 30th, 2018, 4:25 pm
by JMN2
The way I did it I now have "Sheet2" which brings in the previous close prices, both Sheet1 for current prices and Sheet2 are hidden, Sheet1 prices linked to my portfolio where the macro button is, and a new work sheet called Daily Change collates all prices and has both macro buttons too to run them and show the change and in %.

All I had to do was in archive add a copy of the script to python folder where two words were amended (sheet1 and regularMarketPrice), and add one row to Meta file.

Thanks again to Kiloran.

Re: Simple Yahoo Price Scrape update

Posted: January 30th, 2018, 4:26 pm
by kiloran
pochisoldi wrote:
kiloran wrote: Since late last year, Yahoo have discontinued their Finance API which used these letter/number combinations. There is an alternative, which is much more complicated to use: http://lemonfoolfinancialsoftware.weebl ... nload.html
But not as complicated or as slow as scraping a web page to get data.

PochiSoldi
Amen to that :D

--kiloran