Last active
July 18, 2018 03:25
-
-
Save erikgregorywebb/afaba9309f54c8cdbefa25bc66da6b84 to your computer and use it in GitHub Desktop.
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
def getListingLinks(link): | |
# Open the driver | |
driver = webdriver.Chrome(executable_path="/Users/erikgregorywebb/Downloads/chromedriver 2") | |
driver.get(link) | |
# Save the links | |
listing_links = [] | |
links = driver.find_elements_by_css_selector('.listing-item-link') | |
for link in links: | |
listing_links.append(str(link.get_attribute('href'))) | |
driver.close() | |
return listing_links |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment