一、前言
在研究分析师策略时需要爬取相关的分析师数据,这里对分析师数据做一下简介:股票分析师数据是指从专业的股票分析师机构或个人分析师那里获取的关于特定股票的信息和预测数据。这些数据通常包括分析师的股票评级、目标价格、预测盈利和营收等预测,以及他们对公司基本面、行业趋势和市场动态的分析。股票分析师数据在投资决策中扮演着重要的角色,投资者可以通过分析师的意见和预测来指导自己的投资策略。
网址:http://stock.finance.sina.com.cn/stock/go.php/vIR_RatingNewest/index.phtml

代码:
import pandas as pd
import time
from selenium import webdriver
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.81 Safari/537.36 Edg/104.0.1293.47'}
# 显示设置
pd.set_option('max_rows', None)
pd.set_option('max_columns', None)
pd.set_option('expand_frame_repr', False)
pd.set_option('display.unicode.ambiguous_as_wide', True)
pd.set_option('display.
本主题为课程学员专享,成为股票量化投资课程学员后可免费阅读
成为学员