Financial time series data

hidura at gmail.com hidura at gmail.com
Thu Sep 2 20:55:12 EDT 2010


I've tried to see the page and the code GSPC it's wrong i has used ^DJI, 
and when you download the page code use a xml parser localize the table 
element and read it. I can't access from the browser to the next page it 
doesn't appear as a link.
El , Virgil Stokes <vs at it.uu.se> escribió:
> On 09/02/2010 08:15 PM, Hidura wrote:

> But what kind of data you want to download?, because the financial

> time it's basicly html code and you can work very well with a parser

> 2010年9月2日, Virgil Stokesvs at it.uu.se>:

> Has anyone written code or worked with Python software for downloading

> financial time series data (eg from Yahoo financial)? If yes, would you

> please contact me.

> --Thanks,

> V. Stokes

> --

> http://mail.python.org/mailman/listinfo/python-list

> Here is a snippet of python code that I am trying to use for downloading 
> financial data; but, I do not understand why it returns information from 
> the second HTML page.

> import urllib2

> '''

> I am trying to read each row of the table at:

> http://finance.yahoo.com/q/cp?s=^GSPC

> '''

> ticker = []

> url = 
> urllib2.urlopen("http://download.finance.yahoo.com/d/quotes.csv?s=@%5EGSPC&f=sl1d1t1c1ohgv&e=.csv&h=PAGE".replace('PAGE', 
> str(0)))

> data = url.read()

> Note, it does get all 50 rows of the first page; but, why does it also 
> get the first row of the "next" HTML page?

> --V

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100903/5c4603cb/attachment-0001.html>


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /