On Apr 1, 3:13 pm, "Ulysse" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm trying to extract the data from HTML table. Here is the part of
> the HTML source :
>
> ....
>
> Do you know the way to do it ?

Beautiful Soup is an easy way to parse HTML (that may be broken).
http://www.crummy.com/software/BeautifulSoup/

Here's a start of a parser for your HTML:

soup = BeautifulSoup(txt)
for tr in soup('tr'):
    dateTd, textTd = tr('td')[1:]
    print 'Date :', dateTd.contents[0].strip()
    print textTd #element still needs parsing

where txt is the string in your message.

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

Reply via email to