Created
June 3, 2021 07:16
-
-
Save mor120/e89772715c78554c26f03fa4d0f1ec73 to your computer and use it in GitHub Desktop.
This file will contain Page class to represent a search page.
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 time import sleep | |
class Page(object): | |
search_url = "https://web.archive.org/web/*/{}" | |
def __init__(self, search_term): | |
self.search_term = search_term | |
def get_items(self): | |
driver = webdriver.Chrome() | |
driver.get(self.search_url.format(self.search_term)) | |
sleep(10) | |
return driver |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment