- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
为了使用 jQuery 发出跨域 AJAX 请求,我尝试使用 YQL RSS。
select * from rss where url='https://www.top1000funds.com/feed/most-popular-posts/'
我的代码:
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 端的问题,与使用的代码或其他内容无关。如果您刷新查询,他会随机加载错误或正常。
我认为我们(用户)对此无能为力。雅虎需要解决这个问题...
关于jquery - 雅虎 YQL RSS - 错误请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45873994/
所有, 我一直在一组文档上运行Y!LDA(https://github.com/shravanmn/Yahoo_LDA),结果看起来不错(或至少达到我的期望)。现在,我想使用产生的主题对语料库执行反向
我正在尝试订阅 onTimeIndexChanged 媒体播放器事件。只要我订阅的 View 保持专注,它就可以正常工作。当我按下后退按钮或小部件按钮时,我的 View 变得模糊并且不再接收事件。 这
我必须将 yahoo api 集成到我的应用程序中。谁能给我提供步骤吗? 由于我们已经集成了雅虎,所以我们从雅虎获得了一个 token key ,输入 key 后我们进入应用程序。在雅虎登录后是否有任
我直接从 Yahoo! 下载股票数据财务。 我比较两个日期的“Adj Closed”以获得增长率。例如,1987 年 7 月 20 日,KO(可口可乐)调整后的收盘值为 1.71,2013 年 7 月
我正在尝试遵循 Yahoo hadoop 教程: http://developer.yahoo.com/hadoop/tutorial/module3.html#vm 一切正常,直到我尝试根据“Ecl
我有现有的网络应用程序和专用的 Yahoo App在职的。它使用 OAuth2 Implicit Grant Flow 现在我想设置另一个按相同原理工作的域。我创建了新的 Yahoo App使用新的回
我正在使用 Dope-openid我网站上的图书馆,但在使用雅虎帐户登录时,用户会收到上面的消息 单击“同意”以使用您的 Yahoo! 登录 www.mywebsitename.com身份证。 警告:
我在以下网址找到了有关如何从Yahoo下载历史日内数据的在线文章:http://www.quantshare.com/sa-426-6-ways-to-download-free-intraday-a
这是我在雅虎上的问题的一种重新发布!论坛。只是我更频繁地提到 StackOverflow ...... 我的问题如下:而 Yahoo! OAuth http://developer.yahoo.com
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 8 年前。 Improve this ques
我如何从 yahoo api 接收到接收到的日期时间的特定时区? 默认时区是什么? http://hk.finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&
我如何从 yahoo api 接收到接收到的日期时间的特定时区? 默认时区是什么? http://hk.finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&
为了使用 jQuery 发出跨域 AJAX 请求,我尝试使用 YQL RSS。 select * from rss where url='https://www.top1000funds.com/fe
我知道我可以使用 jquery、.ajax 和 jsonp 进行跨域 ajax 调用。我正在调用雅虎股票报价 API。一切正常,结果正在返回(我可以使用 Fiddler 看到。)问题是我收到一个 js
我一直在开发一个使用雅虎财经的 json 获取股票数据的应用程序,但我在错误代码中遇到了问题。它在 else 语句中显示未解析的标识符 jsonDict 和预期的表达式错误。 这是代码。 import
这是 Yahoo Aviate Launcher 的屏幕截图之一: 我想做的就是这样。当用户滑动到启动器的最右侧页面(按字母顺序排列的应用程序列表)时,此屏幕截图的左侧仍然可以保留为左侧页面的一部分。
我正在尝试与基于 Django 的 Web 应用程序中现有商家帐户的 Yahoo! 的 Checkout API 集成。我已经成功地集成了他们的 Catalog API,但由于某种原因,我根本无法让
我每天都在处理 HTML 电子邮件营销事件,在过去的 24 小时内,我发现我所有的电子邮件都是左对齐的。这包括我之前构建的电子邮件事件(已在 Yahoo! Mail 中测试并用于对齐中心)。 有没有人
已关闭。这个问题是 off-topic 。目前不接受答案。 想要改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 已关闭10 年前。 Improve th
我正在尝试从 Yahoo! 检索市场数据财务和脚本多年来一直运行良好,但最近,它停止显示道琼斯数据。这是网址: http://download.finance.yahoo.com/d/quotes.c
我是一名优秀的程序员,十分优秀!