Python - Beautiful Soup

Dear All,

Please advise how to use beautifulsoup on the periscope. Thanks.

 

from bs4 import BeautifulSoup
import urllib2

url = "https://www.pythonforbeginners.com"

content = urllib2 . urlopen ( url) . read ( )

soup = BeautifulSoup ( content)

print soup . prettify ( )

print title
>> ' title '? Python For Beginners

print soup . title . string
>> ? Python For Beginners

print soup . p


print soup . a

1reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi steven Duong ! We don't support the urllib2 library, but you can definitely use beautifulsoup to parse out the HTML from a field of your SQL output, if this applies to your dataset!

    Reply Like
Like Follow
  • 8 mths agoLast active
  • 1Replies
  • 114Views
  • 2 Following