import requests
from bs4 import BeautifulSoup
url = 'https://www.jn.pt/'
reqs = requests.get(url)
soup = BeautifulSoup(reqs.text, 'lxml')
for heading in soup.find_all(["h2"]):
print(heading.text.strip())
import requests
from bs4 import BeautifulSoup
url = 'https://www.jn.pt/'
reqs = requests.get(url)
soup = BeautifulSoup(reqs.text, 'lxml')
for heading in soup.find_all(["h2"]):
print(heading.text.strip())