parse html:what is the meaning of "//"?
守株待兔
1248283536 at qq.com
Fri Sep 16 09:26:28 EDT 2011
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.tebeka at gmail.com>;
Date: Fri, Sep 16, 2011 09:08 PM
To: "python-list"<python-list at python.org>;
Cc: "python-list"<python-list at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110916/a2f5a416/attachment-0001.html>
More information about the Python-list
mailing list