Код: Выделить всё
1&1
Green
Alpha
DONT INCLUDE
1&1
Yellow
Beta
DONT INCLUDE
Ожидаемый результат
Код: Выделить всё
timestamp id new_id level name
20220113 11 12 1&1 Alpha
20220113 12 31 1&1 Beta
Код: Выделить всё
timestamp = soup.find('main_heading').get('timestamp')
df[timestamp'] = timestamp
Остальное я могу сделать следующим образом:
Код: Выделить всё
typ = []
for i in (soup.find_all('typ')):
typ.append(i.text)
Подробнее здесь: https://stackoverflow.com/questions/752 ... -text-both
Мобильная версия