Created
September 27, 2018 06:42
-
-
Save Lafaiet/950bf5f63a1460a8f5b7f13d4162ee25 to your computer and use it in GitHub Desktop.
Get available links from archieve.org captured from the website bankier.pl
This file contains hidden or 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 | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
driver = webdriver.Chrome() | |
url = 'https://web.archive.org/web/*/http://bankier.pl/' | |
driver.get(url) | |
WebDriverWait(driver, 20).until( | |
EC.presence_of_element_located((By.XPATH, """//*[@id="wb-calendar"] | |
"""))) | |
captures = driver.find_elements_by_xpath("""//*[@id="wb-calendar"]/div/div/div/div/div/div/div/a | |
""") | |
for capture in captures: | |
print capture.get_attribute("href") | |
driver.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment