Сайт является динамическим, поэтому вам придется использовать инструмент управления браузером, такой как selenium
:
from selenium import webdriver
import pandas as pd
from bs4 import BeautifulSoup as soup
d = webdriver.Chrome()
d.get('https://www.dwd.de/DE/leistungen/beobachtung/beobachtung.html')
table = soup(d.page_source, 'lxml')
headers = [i.text for i in table.find_all('th', {'scope':'col'})]
full_table = (lambda x:[x[i:i+len(headers)] for i in range(0, len(x), len(headers))])([i.text for i in table.find_all('td')])
frame = pd.DataFrame([dict(zip(headers, i)) for i in full_table])
Вывод:
Böen DD FF FX HÖHE LUFTD. RR30 Station TEMP. \
0 --- -- --- --- 0 ------ ---- UFS TW Ems ---
1 --- -- --- --- 0 ------ ---- UFS Deutsche Bucht ---
2 --- W 13 18 4 1014.2 0.0 Helgoland
15.1
3 --- NW 28 41 26 1012.6 0.0 List/Sylt
17.1
4 --- W 21 32 43 1012.4 0.0 Schleswig
19.1
5 --- -- --- --- 5 ------ ---- Leuchtturm Kiel ---
6 --- W 23 35 27 1011.8 0.0 Kiel
20.9
7 --- W 21 24 3 1011.4 0.0 Fehmarn
19.0
8 Windböen W 44 58 42 1010.0 0.0 Arkona
18.9
9 --- NW 15 20 11 1014.9 0.0 Norderney
16.4
10 --- -- --- --- 32 ------ ---- Leuchtt. Alte Weser ---
11 --- NW 19 30 5 1014.1 0.0 Cuxhaven
16.8
12 --- W 18 28 11 1013.3 0.0 Hamburg-Flh.
17.4
13 --- W 14 27 59 1012.3 0.0 Schwerin
17.9
14 --- W 20 30 4 1011.4 0.0 Rostock
19.7
15 --- W 21 33 2 1010.8 0.0 Greifswald
....
[79 rows x 11 columns]