extracting a single table

58 views
Skip to first unread message

nomad_alien

unread,
Nov 12, 2009, 9:41:06 AM11/12/09
to beautifulsoup
I have a html document with 3-4 tables in it. I only want to extract
the data that is in the second table. How can I extract only the
second table's data?

Aaron DeVore

unread,
Nov 12, 2009, 12:55:33 PM11/12/09
to beauti...@googlegroups.com
soup.findAll('table')[1]

-Aaron
> --
>
> You received this message because you are subscribed to the Google Groups "beautifulsoup" group.
> To post to this group, send email to beauti...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beautifulsoup?hl=.
>
>
>

nomad_alien

unread,
Nov 13, 2009, 5:13:05 AM11/13/09
to beautifulsoup
Thanks Aaron!
Works a charm!

On Nov 12, 6:55 pm, Aaron DeVore <aaron.dev...@gmail.com> wrote:
> soup.findAll('table')[1]
>
> -Aaron
>
Reply all
Reply to author
Forward
0 new messages