through  the  following code,i get the content of webpage,
     import lxml.html
     url = 'http://finance.yahoo.com/q/op?s=C+Options'
     root = lxml.html.parse(url).getroot() 

with your method ,how can i get the content of webpage  in my python program?

------------------ Original ------------------
From:  "Miki Tebeka"<miki.teb...@gmail.com>;
Date:  Fri, Sep 16, 2011 09:08 PM
To:  "python-list"<python-list@python.org>; 
Cc:  "python-list"<python-list@python.org>; 
Subject:  Re: parse  html:what is the meaning of "//"?

 
As a side note, it's way easier to get this data using YQL. See for example:

http://developer.yahoo.com/yql/console/?q=show%20tables&env=store://datatables.org/alltableswithkeys#h=SELECT%20*%20FROM%20yahoo.finance.options%20WHERE%20symbol%3D%27C%27%20AND%20expiration%3D%272011-09%27

Which gives you the data in JSON format.

(See link at bottom for API URL)
-- 
http://mail.python.org/mailman/listinfo/python-list
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to