Skip to content

Instantly share code, notes, and snippets.

@RizqiEka
Created October 18, 2020 00:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RizqiEka/91201a2615ad825dcd035acc07c31072 to your computer and use it in GitHub Desktop.
Save RizqiEka/91201a2615ad825dcd035acc07c31072 to your computer and use it in GitHub Desktop.
ZoRestAreaAddress
#Restaurant Rating
try:
rest_rating_anchor = driver.find_element_by_xpath("""/html/body/div[1]/div[2]/main/div/section[3]/section/section[2]/section/div[1]/p""")
rest_rating_text = rest_rating_anchor.text
except NoSuchElementException:
rest_rating_text = "Not Rated Yet"
pass
rest_rating.append(rest_rating_text)
print(f'Scraping Restaurant Area - {name} - {rest_rating_text} - OK')
#Restaurant Review
try:
rest_review_anchor = driver.find_element_by_xpath("""/html/body/div[1]/div[2]/main/div/section[3]/section/section[2]/section/div[2]/p""")
rest_review_text = rest_review_anchor.text
except NoSuchElementException:
rest_review_text = "Not Reviewed Yet"
pass
rest_review.append(rest_review_text)
print(f'Scraping Restaurant Review Counts - {name} - {rest_review_text} - OK')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment