I'm trying to extract the first link from a page search, using beautiful soup, but it can't find the link for some reason.
from requests import get
from bs4 import BeautifulSoup
import requests
band = "it's my life bon jovi"
url = f'https://www.letras.mus.br/?q={band}'
res = requests.get(url)
soup = BeautifulSoup(res.content, 'html.parser')
linkurl = soup.find_all("div", class_="wrapper")
for urls in linkurl:
print(urls.get('href'))
#print(soup.a['href']) -- return /
#print(soup.a['data-ctorig]) -- return nothing
I would like to get the link of the data-ctorig or the href, does this link have a script that is preventing me from looking for this information, or is it a problem with my code?