Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from bs4 import BeautifulSoup
- from urllib.request import urlopen
- url='https://simple.wikipedia.org/wiki/List_of_U.S._states'
- web=urlopen(url)
- source=BeautifulSoup(web, 'html.parser')
- table=source.find('table', {'class': 'wikitable sortable jquery-tablesorter'})
- abbs=table.find_all('b')
- print(abbs.get_text())
Add Comment
Please, Sign In to add comment