I fiddled with this forever. The code you gave me put the price & the product together in the same column.
Here's what worked for me:
Here's what worked for me:
source = requests.get('https://www.shopshiptrack.com/index.php?route=product/catalog&limit=100').text soup = BeautifulSoup(source, 'lxml') # csv creation with open('list.csv', 'w', newline="") as csv_file: csv_writer = writer(csv_file) headers = ['Name', 'Price'] csv_writer.writerow(headers) #list variables product_list = [] price_list =[] products_prices = [] #for loops for each_name in soup.find_all('div', class_='name'): products = each_name.a.text product_list.append(products) for each_price in soup.find_all('span', class_='price-normal'): price = each_price.text price_list.append(price) final_list = list(zip(product_list, price_list)) csv_writer.writerows(final_list)