Skip to content

Instantly share code, notes, and snippets.

@ahmedbesbes
Created January 20, 2020 13:29
Show Gist options
  • Save ahmedbesbes/c48b843cdf39d2b4bc9123194a5d1ff1 to your computer and use it in GitHub Desktop.
Save ahmedbesbes/c48b843cdf39d2b4bc9123194a5d1ff1 to your computer and use it in GitHub Desktop.
def extract_company_urls_form_page():
a_list = driver.find_elements_by_xpath('//a[@class="category-business-card card"]')
urls = [a.get_attribute('href') for a in a_list]
dedup_urls = list(set(urls))
return dedup_urls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment