04pallav
9/11/2017 - 10:27 PM

Beautiful Soup

Beautiful Soup

from urllib import urlopen
url = "https://en.wikipedia.org/wiki/Python_(programming_language)"
html = urlopen(url).read()
from bs4 import BeautifulSoup
#BeautifulSoup in order to strip away the HTML code.
web_str = BeautifulSoup(html).get_text()