使用 Scrapy+Selenium 在天天基金网爬去指定指数类型的宽基基金,并做定投初步筛选导出xlsx
本脚本仅供学习使用,如有其他用途,后果自负
Python3.6.2
openpyxl==2.4.8
Scrapy==1.3.3
selenium==3.141.0
lxml==4.4.2
- clone
git clone https://github.com/gladioli/IndexFund.git
- 安装依赖
cd IndexFund
pip install -r requriements.txt
- 修改指数类型
打开spiders/csi_500.py,
将search_key的值修改成想要查询的指数类型,如:上证50、中证500、沪深300
search_key = '中证500'