Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97826

How to set paths while scraping data from website

$
0
0

I am scraping data from this URL. This is my code:

from selenium import webdriver
import os
import time
chrome_driver = os.path.abspath(os.path.dirname(__file__)) + '/chromedriver'
browser = webdriver.Chrome(chrome_driver)
browser.get("https://angel.co/companies?locations[]=1688-United+States")
time.sleep(3)
data_row = browser.find_elements_by_class_name('base.startup')
for item in data_row:
    print('-'*100)
    company = item.find_element_by_class_name('name').text
    location = item.find_element_by_class_name('column.location').text
    print(company)
    print(location)

Can anyone please help me with? I am using Windows 10.

  1. What should be the path of my file which i am collecting all data in?
  2. Is this code right or is there another library available which scrapes data faster then BS or selenium?

Viewing all articles
Browse latest Browse all 97826

Trending Articles