Skip to content

Commit

Permalink
commit 5
Browse files Browse the repository at this point in the history
  • Loading branch information
engytawadros committed Sep 29, 2023
1 parent 55b19a2 commit 114a682
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
run $(git ls-files '*.py')
12 changes: 4 additions & 8 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# Chrome Options -------------------------------------:

chrome_options.add_argument('incognito') ## Opens Chrome in incognito mode
chrome_options.add_argument('incognito') ## Opens Chrome in incognito mode
# chrome_options.add_experimental_option("detach", False) ## chromedriver will stay open afterward
# chrome_options.add_argument('--headless') ## chrome window will not pop up

Expand All @@ -37,15 +37,15 @@
# driver.get('https://www.google.com/') # testing

amazon_base_url = "https://www.amazon.com"
lindt ='B07BNNQJSL' # Amazon product code
lindt = 'B07BNNQJSL' # Amazon product code
product = 'B076B7V2QJ'

amazon_product_url = amazon_base_url + "/dp/" + product
driver.get(amazon_product_url)

time.sleep(2) # imp to sleep

page_title = driver.title # get webpage title
page_title = driver.title # get webpage title

# print(page_title)

Expand Down Expand Up @@ -76,8 +76,7 @@

rev_html = soup.find_all("div", {'data-hook': "review"})

rev_string = str(rev_html)

Rev_String = str(rev_html)

product_name = soup.find("a", {'data-hook': "product-link"}).text.strip("\n")
reviews_title = soup.find("a", {'data-hook': "review-title"}).text.strip("\n")
Expand All @@ -92,6 +91,3 @@
print(f'reviews_stars: {reviews_stars}')

# driver.quit() # closes the browser



0 comments on commit 114a682

Please sign in to comment.