Created
October 18, 2020 00:47
-
-
Save RizqiEka/91201a2615ad825dcd035acc07c31072 to your computer and use it in GitHub Desktop.
ZoRestAreaAddress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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