I am trying to scrape an attribute from but I must doing something wrong because I cant´t get it.
this is my code
import requests
from bs4 import BeautifulSoup
url = 'https://www.pccomponentes.com/procesadores'
headers = ({'User-Agent':
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36',
'Accept-Language': 'es-ES, es;q=0.5'})
page = requests.get(url,headers=headers)
soup = BeautifulSoup(page.content,'html.parser')
product = soup.find('div',class_ = 'col-xs-6 col-sm-4 col-md-4 col-lg-4')
#print(product)
brand = product.find('a', attrs={'class': 'c-product-card__title-link cy-product-link'})['data-brand']
print(brand)
The target is to obtain "AMD".
Any help would be much appreciate.
Regards