Edd
Edd

Reputation: 685

how to get data from html with beautiful soup

the output of this code:

productNameText = down_page.find(id='productNameText')
print(productNameText)

gives:

[u'\n', <h1>

            Bold Print Short
        </h1>, u'\n']

How can I gently take only Bold Print Short text from here Thanks

Upvotes: 0

Views: 70

Answers (1)

Girish
Girish

Reputation: 893

 productNameText = down_page.find(id='productNameText').get_text()
 print productNameText

get_text() Beautiful Soup documentation

Upvotes: 1

Related Questions