diff --git a/AWS/lambda_function.py b/AWS/lambda_function.py index fd56324..7a87a7b 100644 --- a/AWS/lambda_function.py +++ b/AWS/lambda_function.py @@ -14,9 +14,10 @@ from urls import URL_LIST # loop through the URLs -for page in URL_LIST: +for each_url in URL_LIST: # query each website and return html, parse the html using Beautiful Soup and store in variable 'soup' - soup = BeautifulSoup(requests.get(page).content, 'html.parser') + page = requests.get(each_url) + soup = BeautifulSoup(page.content, 'html.parser') # take out the
of name and get its value product_name_box = soup.find('h1', attrs={'class': 'h1 product-name text-uppercase d-none d-sm-block large-devices'}) diff --git a/GCP/main.py b/GCP/main.py index 802efc2..ea9dd8f 100644 --- a/GCP/main.py +++ b/GCP/main.py @@ -10,9 +10,10 @@ from urls import URL_LIST # loop through the URLs -for page in URL_LIST: +for each_url in URL_LIST: # query each website and return html, parse the html using Beautiful Soup and store in variable 'soup' - soup = BeautifulSoup(requests.get(page).content, 'html.parser') + page = requests.get(each_url) + soup = BeautifulSoup(page.content, 'html.parser') # take out the
of name and get its value product_name_box = soup.find('h1', attrs={'class': 'h1 product-name text-uppercase d-none d-sm-block large-devices'}) diff --git a/__main__.py b/__main__.py index aaac19b..ee751d0 100644 --- a/__main__.py +++ b/__main__.py @@ -18,9 +18,9 @@ from urls import URL_LIST # loop through the URLs -for website in URL_LIST: +for each_url in URL_LIST: # query each website and return html, parse the html using Beautiful Soup and store in variable 'soup' - page = requests.get(website) + page = requests.get(each_url) soup = BeautifulSoup(page.content, 'html.parser') # take out the
of name and get its value