mirror of
https://github.com/13hannes11/UU_NCML_Project.git
synced 2024-09-03 20:50:59 +02:00
Update uk_scraper.py
updated with From and To date feature
This commit is contained in:
@@ -49,9 +49,12 @@ def get_all_link_urls():
|
||||
|
||||
WebDriverWait(driver, 10).until(ec.visibility_of_element_located((By.XPATH, '//div[contains(@class, "card-list")]')))
|
||||
|
||||
#driver.find_element_by_xpath('//*[@id="FromDate"]').send_keys(DATE_FROM)
|
||||
#driver.find_element_by_xpath('//*[@id="ToDate"]').send_keys(DATE_TO)
|
||||
#driver.find_element_by_xpath('//*[@id="voteSearch"]/div[2]/div/div/div/button').click()
|
||||
driver.find_element_by_xpath('//*[@id="FromDate"]').clear()
|
||||
driver.find_element_by_xpath('//*[@id="ToDate"]').clear()
|
||||
driver.find_element_by_xpath('//*[@id="FromDate"]').send_keys(DATE_FROM)
|
||||
driver.find_element_by_xpath('//*[@id="ToDate"]').send_keys(DATE_TO)
|
||||
#time.sleep(WAIT_TIME_SEC)
|
||||
driver.find_element_by_xpath('//button[@class="btn btn-primary"]').click()
|
||||
|
||||
running = True
|
||||
while running:
|
||||
@@ -115,4 +118,4 @@ for elem in title_link_list:
|
||||
|
||||
for file_url in title_csv_list:
|
||||
save_to_file(file_url, DOWNLOAD_FOLDER)
|
||||
#print(file_url)
|
||||
#print(file_url)
|
||||
|
||||
Reference in New Issue
Block a user