Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 刮取angellist启动数据_Python_Selenium_Web Scraping_Beautifulsoup_Scrapy - Fatal编程技术网

Python 刮取angellist启动数据

Python 刮取angellist启动数据,python,selenium,web-scraping,beautifulsoup,scrapy,Python,Selenium,Web Scraping,Beautifulsoup,Scrapy,我想从https://angel.co/companies?locations[]=1688美国+美国。谁能告诉我该怎么办 我知道我应该使用BeautifulSoup或Selenium,但最终我发现这个网页不是静态的,它会一次又一次地更改其数据,有人能指导我吗 我认为angellist API网页不再工作。您需要等待几秒钟,直到生成页面上的表: from selenium import webdriver import os import time chrome_driver = os.pat

我想从
https://angel.co/companies?locations[]=1688美国+美国
。谁能告诉我该怎么办

我知道我应该使用BeautifulSoup或Selenium,但最终我发现这个网页不是静态的,它会一次又一次地更改其数据,有人能指导我吗


我认为angellist API网页不再工作。

您需要等待几秒钟,直到生成页面上的表:

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)
输出:

----------------------------------------------------------------------------------------------------
WP Engine
Austin
----------------------------------------------------------------------------------------------------
Kissmetrics
San Francisco
----------------------------------------------------------------------------------------------------
Bluesmart
San Francisco
----------------------------------------------------------------------------------------------------
Star.me
Los Angeles
...
...

你能添加你想提取的数据格式吗。@vish use
Selenium
hello@tek nath如果你打开这个URL,你会看到一个表格,我想提取表格,其中有列(公司、地点、市场、网站、员工、总收入)这6列我想extract@vish读这个:你好,当我使用这个路径“\Users\Dell User\Downloads\Compressed\chromedriver\u win32”它显示一个耳环:SyntaxError:(unicode错误)“UnicodeScape”编解码器无法解码位置0-1中的字节:已截断\uxxxxx请转义help@ZarakaiKenpachi您能为C:\Users\Dell User\Downloads\Compressed\chromedriver\u win32创建一个正确的路径吗?我应该如何编写它?我已经尝试了chrome\u driver=“C:\\Users\\Dell User\\Downloads\\Compressed\\chromedriver\u win32“仍不工作显示路径不工作found@vish对不起,我不能测试。我是Linuxuser@Zarakai谢谢你兄弟的帮助,我会想办法解决的