Need help getting BeautifulSoup contents

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alexnb

    Need help getting BeautifulSoup contents


    The trick to this one is that the html looks something like this:

    "<td width="100%" colspan="2">
    american,
    /browse/blue blue
    ,
    /browse/brick brick
    , brie, cheddar, cheshire,
    /browse/churn churn
    ,
    /browse/cottage cottage
    ,
    /browse/cream cream
    , dunlop,

    and it goes on
    </td>"

    My question is I want everything inside, the contents of each ad the
    regular text of the <td>.
    I know I can do like a.contents, but it only gives me the first one, in this
    case being "blue". I want the contents of each of those and the regular
    contents of the <td>.

    Can anyone help?

    --
    View this message in context: http://www.nabble.com/Need-help-gett...p18501881.html
    Sent from the Python - python-list mailing list archive at Nabble.com.

Working...