雅虎 YQL RSS - 错误请求

2023-12-03

为了使用 jQuery 发出跨域 AJAX 请求,我尝试使用 YQL RSS。

select * from rss where url='https://www.top1000funds.com/feed/most-popular-posts/'

My code:

var feed = "https://www.top1000funds.com/feed/most-popular-posts/";
var yql = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss%20where%20url%3D%22"+encodeURIComponent(feed)+"%22&format=json&diagnostics=true&callback=&rnd=_"+event.timeStamp;
console.log(yql);

$.getJSON(yql, function(res) {
    var html = '<div class="feedListWrap">';
    if(res.query && res.query.results && res.query.results.item){
        //code goes here
    } else {
        html += '<div class="feedEmpty">The feed is currently not available due to server issues. Check back soon!</div>';
    }
    html += '</div>';
    rssWrap.append(html);
}, "jsonp");

它工作正常,但现在我在 json 响应上遇到错误请求问题,没有错误的文本描述:

{"query":{"count":0,"created":"2017-08-25T03:09:09Z","lang":"en","diagnostics":{"publiclyCallable":"true","url":{"execution-start-time":"0","execution-stop-time":"2","execution-time":"2","http-status-code":"400","http-status-message":"Bad Request","content":"https://www.top1000funds.com/feed/most-popular-posts/"},"user-time":"2","service-time":"2","build-version":"2.0.164"},"results":null}}

您可以使用 url 查询进行测试:link

当尝试检查 YQL 控制台时,它工作正常:

{
 "query": {
  "count": 10,
  "created": "2017-08-25T02:54:38Z",
  "lang": "en-US",
  "diagnostics": {
   "publiclyCallable": "true",
   "url": {
    "execution-start-time": "1",
    "execution-stop-time": "8",
    "execution-time": "7",
    "content": "https://www.top1000funds.com/feed/most-popular-posts/"
   },
   "user-time": "8",
   "service-time": "7",
   "build-version": "2.0.164"
  },
  "results": {
   "item": [
    {
     "title": "OTPP’s private equity revolution",
     "link": "https://www.top1000funds.com/profile/2017/08/03/otpps-private-equity-revolution/",
     "pubDate": "Thu, 03 Aug 2017 06:39:33 +0000",
     "creator": "Sarah Rundell",
     "guid": {
      "isPermaLink": "false",
      "content": "http://www.top1000funds.com/?p=17673"
     },
     "description": "<div class=\"feedThumb\"><img width=\"125\" height=\"125\" src=\"https://dmmn26wgpgtie.cloudfront.net/wp-content/uploads/2017/08/03163918/jane-rowe_700px-125x125.jpg\" class=\"attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" srcset=\"https://dmmn26wgpgtie.cloudfront.net/wp-content/uploads/2017/08/03163918/jane-rowe_700px-125x125.jpg 125w, https://dmmn26wgpgtie.cloudfront.net/wp-content/uploads/2017/08/03163918/jane-rowe_700px-150x150.jpg 150w\" sizes=\"(max-width: 125px) 100vw, 125px\" /></div><div class=\"feedExcerpt\">A deep dive into the world-class private capital division of OTPP, led by Jane Rowe, reveals a strategy of buying large direct stakes in companies, and a commitment to innovation.</div>",
     "encoded": "<div class=\"feedThumb\"><img width=\"125\" height=\"125\" src=\"https://dmmn26wgpgtie.cloudfront.net/wp-content/uploads/2017/08/03163918/jane-rowe_700px-125x125.jpg\" class=\"attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" srcset=\"https://dmmn26wgpgtie.cloudfront.net/wp-content/uploads/2017/08/03163918/jane-rowe_700px-125x125.jpg 125w, https://dmmn26wgpgtie.cloudfront.net/wp-content/uploads/2017/08/03163918/jane-rowe_700px-150x150.jpg 150w\" sizes=\"(max-width: 125px) 100vw, 125px\" /></div><div class=\"feedExcerpt\">A deep dive into the world-class private capital division of OTPP, led by Jane Rowe, reveals a strategy of buying large direct stakes in companies, and a commitment to innovation.</div>"
    },
    {
     "title": "The value of the Canadian model",
     "link": "https://www.top1000funds.com/analysis/2017/08/08/the-value-of-the-canadian-model/",
     "pubDate": "Tue, 08 Aug 2017 04:53:00 +0000",
     "creator": "AMANDA WHITE",
     "guid": {
      "isPermaLink": "false",
      "content": "http://www.top1000funds.com/?p=17681"
     },
     "description": "<div class=\"feedThumb\"><img width=\"125\" height=\"125\" src=\"https://dmmn26wgpgtie.cloudfront.net/wp-content/uploads/2016/03/22215806/Keith-Ambachtsheer-Head_Shoulders_Jan-700x500-2016-125x125.jpg\" class=\"attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" srcset=\"https://dmmn26wgpgtie.cloudfront.net/wp-content/uploads/2016/03/22215806/Keith-Ambachtsheer-Head_Shoulders_Jan-700x500-2016-125x125.jpg 125w, https://dmmn26wgpgtie.cloudfront.net/wp-content/uploads/2016/03/22215806/Keith-Ambachtsheer-Head_Shoulders_Jan-700x500-2016-150x150.jpg 150w\" sizes=\"(max-width: 125px) 100vw, 125px\" /></div><div class=\"feedExcerpt\">A lot has been written about the superiority of the “Canadian model” for managing pensions, but can a value be assigned to this organisational design structure? </div>",
     "encoded": "<div class=\"feedThumb\"><img width=\"125\" height=\"125\" src=\"https://dmmn26wgpgtie.cloudfront.net/wp-content/uploads/2016/03/22215806/Keith-Ambachtsheer-Head_Shoulders_Jan-700x500-2016-125x125.jpg\" class=\"attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" srcset=\"https://dmmn26wgpgtie.cloudfront.net/wp-content/uploads/2016/03/22215806/Keith-Ambachtsheer-Head_Shoulders_Jan-700x500-2016-125x125.jpg 125w, https://dmmn26wgpgtie.cloudfront.net/wp-content/uploads/2016/03/22215806/Keith-Ambachtsheer-Head_Shoulders_Jan-700x500-2016-150x150.jpg 150w\" sizes=\"(max-width: 125px) 100vw, 125px\" /></div><div class=\"feedExcerpt\">A lot has been written about the superiority of the “Canadian model” for managing pensions, but can a value be assigned to this organisational design structure? </div>"
    },
    ...
   ]
  }
 }
}

请问有什么建议吗?


我认为这是雅虎 YQL 端的问题,与使用的代码或其他内容无关。 如果您刷新查询,他会随机加载错误或正常。

我认为我们(用户)对此无能为力。 雅虎需要解决这个问题...

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

雅虎 YQL RSS - 错误请求 的相关文章

随机推荐

  • 如何在 CakePHP 2.0 中发送带有附件的电子邮件?

    我正在尝试使用 CakePHP 2 0 发送一封带有附件的电子邮件 该文件由用户通过表单提交 到目前为止我有 App uses CakeEmail Network Email email new CakeEmail email gt att
  • 使用 handler.postDelayed 获取剩余时间

    我在用handler postDelayed为某些动画内容创建一些延迟的方法 像这样 Handler h new Handler h postDelayed new Runnable Override public void run Sta
  • 如何在 foreach 循环中删除 xmlnode?

    在下面的代码中 我使用 foreach 循环来检查节点列表中的每个节点并删除其中的一些节点 删除一个节点后 foreach 循环抛出以下错误 元素列表已更改 枚举操作无法继续 我怎样才能避免它 public static XmlNodeLi
  • 在C中使用紧凑指针寻址二维数组的元素[关闭]

    Closed 这个问题需要调试细节 目前不接受答案 我正在使用 C 实现莫尔斯电码并遇到一些基础知识 基本思想是我有 A 到 Z 的二维字符数组 每个数组的第一个元素是一个字母表 后跟相应的莫尔斯电码 程序将接收一个字符 一旦找到匹配项 该
  • Hadoop 类型与映射预期值中的键不匹配文本收到的值 LongWritable

    有人知道为什么我会收到此错误吗 我看过很多其他类似的帖子 但其中大多数不适用于我 我也尝试了发布的一些确实适用于我的解决方案 但它们不起作用 我确信我只是错过了一些愚蠢的东西 谢谢您的帮助 chris chrisUHadoop usr lo
  • 将按类别分类的行添加到我的数据框中

    我使用 groupby 创建了一个新的聚合数据框 但在每个类别下添加小计行时遇到问题 我尝试过使用 pd groupby 和数据透视表并更改索引 但我无法按照我想要的方式表示数据 为每个 客户 创建 USD Balance 小计 但将其添加
  • 如何使可调用的谷歌云函数幂等

    我有一个谷歌云功能 可以向 firebase 主题发送通知 该功能一直工作正常 直到突然 它开始同时发送多个通知 2 或 3 联系 Firebase 支持团队后 他们告诉我我应该使函数幂等 但我不知道如何 因为它是一个可调用函数 更多细节
  • 将新的 APNS 证书上传到 GCM

    我们有一个使用 GCM 的 iOS 和 Android 应用程序 我正在尝试将新的生产 APNS 证书上传到 GCM 但无法上传 因为 Google 正在将 GCM 迁移到 Firebase 我怎么做 这是 Google 开发者产品的屏幕截
  • 自动标记 C 中未使用的结构成员

    我需要一个工具来自动标记未使用的结构成员在 C 代码库中 我对 未使用 的定义很简单 如果从代码中删除结构成员定义 并且代码编译成功 则该结构成员被声明为未使用 问题是 如何以自动化方式完成此操作 由于代码库很小 速度并不是太重要 关于该主
  • Marionette.js appRouter 在应用程序启动时未触发

    我目前正在将 Marionette 集成到现有的 Backbone 应用程序中 我已经有一个现有的 Backbone 路由器 但我正在尝试实现 Marionette AppRouter 来取代它 问题是 在新 Marionette 路由器应
  • 调试 Qt 源代码

    是否可以进入 Qt 源 例如qmainwindow cpp 在 Qt Creator 中 目前我正在看到反汇编 但如果能看到源代码就好了 当然 但你可能必须首先 转到 QT HOME qt 使用 debug 或 debug and rele
  • 将 uiimage 设置为 nil 不会使用 ARC 释放内存

    我有一个滚动视图 它在页面滚动时显示不同的图像 例如 PhotoScroller 我正在使用ARC 当有人滚动到另一个页面时 我将当前未显示的 UIImageView 的图像属性设置为 nil 作为 尝试 避免内存崩溃 这种情况仍在发生 然
  • Now.js 中的会话支持

    Now js 引用 只需在 nowjs initialize 中传递一个连接或快速 http 服务器 this user session 就应该可用 So express require express app module exports
  • 如果任何线程发生异常,则中断所有线程

    我有一个方法名称someTask我必须调用 100 次 并且我正在使用异步编码 如下所示 for int i 0 i lt 100 i futures add CompletableFuture supplyAsync gt someTas
  • Postgres 中的递归 CTE

    我有一个结构如下的表 Employee ID Employee Name Manager ID 而且 对于每个员工 我都需要出示最高管理者的 ID 我的意思是 例如 如果我有 EmployeeID 2 其经理为 3 因此 数字 3 的经理为
  • 如何允许某些特定IP地址访问我的WCF服务

    我有一个 WCF 服务返回 xml 我只想要一个 IP 地址来访问它 例如 10 0 0 5 有人可以告诉我我该怎么做吗 请告诉我除防火墙和 IIS 之外的其他内容 您需要添加 ip 过滤 如下所示 https stackoverflow
  • 将文本值输入到 div 中?

    假设我有这个文本框
  • IPv6 的示例数据?

    是否存在 IPv6 流量的示例数据集 例如Apache 日志还是流量分析日志 或者 是否有人有任何想法如何生成一个或 乐观地 现有工具来生成数据 理想情况下 我希望实际部署的示例地址与该范围内的地址数量和 或来自这些范围的预期流量成比例 即
  • 访问资源目录路径

    看起来 NSBundle mainBundle pathForResource name ofType png 对于 Images xcassets 资产目录内的资产 不返回任何内容 我也尝试过 NSBundle mainBundle pa
  • 雅虎 YQL RSS - 错误请求

    为了使用 jQuery 发出跨域 AJAX 请求 我尝试使用 YQL RSS select from rss where url https www top1000funds com feed most popular posts My c