View BasicZomatoSearchPage.py
# 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") | |
View LoopThroughWebElements.py
out_lst = [] | |
for j in url_elt: | |
url = j.get_attribute("href") | |
out_lst.append(url) |
View SeleniumPreparation.py
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