1

我运行了以下命令:

import edgar
import pandas as pd
edgar.download_index('/Users/myusername/Desktop/Desktop', 2010,skip_all_present_except_last=False)

它抛出以下错误要求 user_agent。如果我在其他任何事情上出错,请澄清我在哪里可以获得该用户代理和指导?错误信息是:

TypeError                                 Traceback (most recent call last)
<ipython-input-7-95d304376aa1> in <module>
      1 import edgar
      2 import pandas as pd
----> 3 edgar.download_index('/Users/myusername/Desktop/Desktop', 2010,skip_all_present_except_last=False)

TypeError: download_index() missing 1 required positional argument: 'user_agent'
4

1 回答 1

0

根据包文档,有一个user_agent参数。此参数是必需的。给定的示例是“MyCompany edward@mycompany.com”

尝试:

edgar.download_index('/Users/myusername/Desktop/Desktop', 2010, "your_name your@email.address", skip_all_present_except_last=False)
于 2021-08-14T15:48:02.833 回答