Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. import requests
  2. from bs4 import BeautifulSoup
  3.  
  4. page = requests.get('https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains')
  5. soup = BeautifulSoup(page.text, 'html.parser')
  6.  
  7. for row in soup.find_all('table')[6].tbody.find_all('tr')[1:]:
  8. column = row.find_all('td')[0].text
  9. print(column)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement