【问题标题】:Use YQL to search EDGAR company filing reports使用 YQL 搜索 EDGAR 公司备案报告
【发布时间】:2014-12-12 10:41:14
【问题描述】:

我想使用 YQL 从 SEC EDGAR 数据库中检索所有 10-Q 和 10-K 文件。 在参考了 [1][2] 的讨论后,我遇到了一些问题。

YQL似乎无法从search engine获取搜索结果。

但是,我可以直接访问 filing detail page

这里有一个 jsfiddle 说明问题。尽管两个查询都返回成功消息,但对搜索引擎的查询返回一个空数组的结果。

有没有其他方法可以在不查询 EDGAR 搜索引擎的情况下获取详细归档页面的所有 html 地址?谢谢。

使用 YQL 的示例代码如下所示:

    // results page from EDGAR search engine:
    // fail to get data
    var queryURL = "http://www.sec.gov/cgi-bin/browse-edgar?" +  
     "action=getcompany&CIK=0001326801&type=10-K&dateb=&owner=exclude&count=100";

    // EDGAR 10-K detail filing page:
    // success to fetch by YQL
    var filingURL = "http://www.sec.gov/Archives/edgar/data/1326801/" + 
        "000132680114000007/0001326801-14-000007-index.htm";


    $.get(queryURL).then(function() { 
          // get successful message, but get results of empty array
     })
    .then(function() {
        $.get(filingURL).then(function() {             
            // get successful message, and get results of empty array
       })
    } ) 

【问题讨论】:

    标签: javascript ajax yql


    【解决方案1】:

    /cgi-bin URL 受到robots.txt 的限制,因此 YQL 将尊重这一点,而不是抓取该页面。

    您可以通过为 YQL 查询启用诊断来看到这种情况。

    • diagnostics=true 添加到YQL URL,例如/v1/public/yql?diagnostics=true&callback=?
    • 在结果中查找diagnostics 字段。这包含有关查询及其访问的任何 URL 的信息。

    【讨论】:

      猜你喜欢
      • 2011-04-05
      • 1970-01-01
      • 1970-01-01
      • 2021-02-24
      • 2021-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多