尝试下载SEC填充文件时无法创建目录

时间:2019-01-13 20:47:22

标签: python

我是python的新手,但尝试下载SEC填充物。我确定这是一个非常基本的错误,但是为什么我在此link上运行脚本。我收到错误消息:

File
"C:\Users\...\AppData\Local\Programs\Python\Python36\lib\site-packages\SECEdgar\crawler.py",
      line 40

    print "Not able to create directory"

脚本为:

import time
from SECEdgar.crawler import SecCrawler

def get_filings():
t1 = time.time()

# create object
seccrawler = SecCrawler()

companyCode = 'AAPL'    # company code for apple
cik = '0000320193'      # cik code for apple
date = '20010101'       # date from which filings should be downloaded
count = '10'            # no of filings

seccrawler.filing_10Q(str(companyCode), str(cik), str(date), str(count))
seccrawler.filing_10K(str(companyCode), str(cik), str(date), str(count))
seccrawler.filing_8K(str(companyCode), str(cik), str(date), str(count))
seccrawler.filing_13F(str(companyCode), str(cik), str(date), str(count))

t2 = time.time()
print ("Total Time taken: "),
print (t2-t1)

if __name__ == '__main__':
get_filings()

0 个答案:

没有答案