I am fresh new to python so I tried with visual studio and windows 7 the following
import csv from bs4 import BeautifulSoup import requests contents = [] with open('websupplies.csv','r') as csvf: # Open file in read mode urls = csv.reader(csvf) for url in urls: contents.append(url) # Add each url to list contents for url in contents: # Parse through each url in the list. page = requests.get(url).content soup = BeautifulSoup(page, "html.parser") price = soup.find('span', attrs={'itemprop':'price'}) availability = soup.find('div', attrs={'class':'product-availability'}) but I get - No connection adapters were found for .. '['a url']'
why?
The structure of csv is like the following
https://www.websupplies.gr/epeksergastis-intel-core-i5-8400-9mb-2-80ghz-bx80684i58400 https://www.websupplies.gr/epeksergastis-intel-celeron-g3930-2mb-2-90ghz-bx80677g3930 https://www.websupplies.gr/epeksergastis-amd-a6-9500-bristol-ridge-dual-core-3-5ghz-socket-am4-65w-ad9500agabbox they dont have at the end a semicolumn