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
# Set Webdriver | |
driver = webdriver.Chrome(chromepath) | |
out_lst = [] | |
# Loop Through Search Pages that we wanted | |
for i in range(1, 1003): | |
print('Opening Search Pages ' + str(i)) | |
driver.get('https://www.zomato.com/jakarta/restoran?page={}'.format(i)) | |
print('Accessing Webpage OK \n') | |
url_elt = driver.find_elements_by_class_name("result-title") |
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
# Set Webdriver | |
driver = webdriver.Chrome(chromepath) | |
out_lst = [] | |
# Loop Through Search Pages that we wanted | |
for i in range(1, 1003): | |
driver.get('https://www.zomato.com/jakarta/restoran?page={}'.format(i)) | |
url_elt = driver.find_elements_by_class_name("result-title") | |
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
out_lst = [] | |
for j in url_elt: | |
url = j.get_attribute("href") | |
out_lst.append(url) |
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
from selenium import webdriver | |
# Set Windows path where WebDriver is located -> to be used for Selenium | |
chromepath = r'C:\Users\Downloads\chromedriver_win32\chromedriver.exe' |
NewerOlder