You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
310 B
Python

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")