import requestsfrom bs4 import BeautifulSoupimport pandas as pdurl ="https://www.newegg.com/Video-Cards-Video-Devices/Category/ID-38?Tpk=graphics%20card"response = requests.get(url)soup =BeautifulSoup(response.content,'html.parser')data_list =[]item_containers = soup.find_all('div',class_='item-container')# Loop through each item container to get the image title and a textfor container in item_containers:# Get Brand Name image = container.find('a',class_='item-brand') brand=image.find('img')# print(brand['title']) product_title = container.find('a',class_='item-img') title =product_title.find('img')# print(title['title']) data_list.append({"Image Title":title['title'],"Brand":brand['title']})df = pd.DataFrame(data_list)df.to_excel("output.xlsx",index=False)