import requests from bs4 import BeautifulSoup countrys = ["Germany"] URL = "https://countrymeters.info/en/" def scrape_bev(land): r = requests.get(f"{URL}{land}") soup = BeautifulSoup(r.text, features="html5lib") table = soup.find("div", {"id": "cp1"}) print(table) scrape_bev("Germany")