What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-18 18:06:03
get table wikipedia
import requests from bs4 import BeautifulSoup URL = "https://en.wikipedia.org/wiki/List_of_current_heads_of_state_and_government" res = requests.get(URL).text soup = BeautifulSoup(res,'lxml') for items in soup.find('table', class_='wikitable')... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5