From 285ee181184ab226ef7e8abfa814bcb6b4a73a78 Mon Sep 17 00:00:00 2001 From: gdmoney <46586741+gdmoney@users.noreply.github.com> Date: Fri, 17 Dec 2021 09:54:59 -0800 Subject: [PATCH] cleanup --- AWS/lambda_function.py | 5 +++-- GCP/main.py | 5 +++-- __main__.py | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) 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