if bs('CLOSED' not in h2.text for h2 in bs.find_all('h2')):
print('CLOSED в списке')
else:
print('Ничего не делать')
for all_headers in bs.find_all('h2'):
if any('CLOSED' in h2.text for h2 in bs.find_all('h2')):
print('Есть в списке')
else:
break
Chain INPUT (policy ACCEPT 337K packets, 895M bytes)
pkts bytes target prot opt in out source destination
50 3000 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:1194
Chain FORWARD (policy ACCEPT 15838 packets, 1256K bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 140K packets, 15M bytes)
pkts bytes target prot opt in out source destination
[blocks B ] sys-apps/gentoo-systemd-integration ("sys-apps/gentoo-systemd-integration" is blocking sys-fs/eudev-3.2.5)
marley / # emerge --unmerge gentoo-systemd-integration
setlocale: unsupported locale setting
setlocale: unsupported locale setting
* This action can remove important packages! In order to be safer, use
* `emerge -pv --depclean <atom>` to check for reverse dependencies before
* removing packages.
--- Couldn't find 'gentoo-systemd-integration' to unmerge.
>>> No packages selected for removal by unmerge