Stata爬虫和讯网上市社会责任报告
使用软件:Stata14
准备步骤:整理需要采集的证券代码放在“证券代码.xlsx”文件里
采集网址
http://stockdata.stock.hexun.com/zrbg/stock_bg.aspx?code=600816&date=2017-12-31
code后面对应的就是公司代码
date后面对应的就是年份,代码以2017年为例,后续需要采集2018年可以修改年份
采集内容:里面所有的指标
涉及到命令
- copy
- openall
- ustrregexs
- ustrregexm
- levelsof
- collapse
- 正则匹配
- 零宽断言
部分采集结果展示
附件下载
- 爬虫.do
- 证券代码.xlsx
- 采集结果.dta