Re: stock quotes off the web, py style

2018-05-16 Thread Friedrich Rentsch
On 05/16/2018 06:21 PM, Mike McClain wrote: On Wed, May 16, 2018 at 02:33:23PM +0200, Friedrich Rentsch wrote: I didn't know the site you mention. I've been getting quotes from Yahoo daily. The service they discontinued was for up to 50 symbols per page. I now parse a separate page of some 50

Re: stock quotes off the web, py style

2018-05-16 Thread Mike McClain
On Wed, May 16, 2018 at 02:33:23PM +0200, Friedrich Rentsch wrote: > > I didn't know the site you mention. I've been getting quotes from > Yahoo daily. The service they discontinued was for up to 50 symbols > per page. I now parse a separate page of some 500K of html for each > symbol! This site i

Re: stock quotes off the web, py style

2018-05-16 Thread Mike McClain
For Friedrich's, Peter's and the many other responses, many thanks. I will get a handle on python eventually and the many teachers on this list are making that easier. Mike -- "There are three kinds of men. The ones who learn by reading. The few who learn by observation. The rest of them have to p

Re: stock quotes off the web, py style

2018-05-16 Thread Brian Oney via Python-list
thank you for that tip. I missed that somehow... На 16 май 2018 г. 16:31:37 GMT+02:00, Peter Otten <__pete...@web.de> написа: >Friedrich Rentsch wrote: > >> >>> ibm = urllib2.urlopen >> ("https://api.iextrading.com/1.0/stock/IBM/quote";).read() >> >>> ibm = eval (ibm) > >Dont do this. You are al

Re: stock quotes off the web, py style

2018-05-16 Thread Chris Lindsay via Python-list
>It serves a naked set of data, which happens to conform to the python source code specification for dictionaries and consequently can be compiled into a dictionary with 'eval', like so: I would highly discourage any long-term usage (or any usage) of eval() in this sort of context. If iextrading

Re: stock quotes off the web, py style

2018-05-16 Thread Peter Otten
Friedrich Rentsch wrote: > >>> ibm = urllib2.urlopen > ("https://api.iextrading.com/1.0/stock/IBM/quote";).read() > >>> ibm = eval (ibm) Dont do this. You are allowing the guys at iextrading.com to execute arbitrary code on your machine. Use ibm = json.loads(ibm) instead or import

Re: stock quotes off the web, py style

2018-05-16 Thread Joel Goldstick
On Wed, May 16, 2018 at 8:33 AM, Friedrich Rentsch wrote: > > > On 05/16/2018 02:23 AM, Mike McClain wrote: >> >> Initially I got my quotes from a broker daily to plug into a >> spreadsheet, Then I found Yahoo and wrote a perl script to grab them. >> When Yahoo quit supplying quotes I found A

Re: stock quotes off the web, py style

2018-05-16 Thread Friedrich Rentsch
On 05/16/2018 02:23 AM, Mike McClain wrote: Initially I got my quotes from a broker daily to plug into a spreadsheet, Then I found Yahoo and wrote a perl script to grab them. When Yahoo quit supplying quotes I found AlphaVantage.co and rewrote the perl script. AlphaVantage.co has been

stock quotes off the web, py style

2018-05-15 Thread Mike McClain
Initially I got my quotes from a broker daily to plug into a spreadsheet, Then I found Yahoo and wrote a perl script to grab them. When Yahoo quit supplying quotes I found AlphaVantage.co and rewrote the perl script. AlphaVantage.co has been down since last week and I found iextrading.com h