重定向时出现Ajax错误

时间:2017-07-18 09:33:14

标签: javascript ajax rss blogger

我想问一下Ajax问题(javascript不是jquery)... 我想从包含RSS(XML格式)的博客获取URL我尝试获取链接https://blogname.blogspot.com/feeds/posts/default 使用Ajax目前没有任何问题,但有时我尝试获得相同的链接,但具有支持FeedBurner的不同博客名称 当我使用浏览器没有问题,但使用Ajax时,它会返回错误,因为从blogname.blogspot.com重定向到feeds.feedburner.com/name

代码截图: xmlhttprequest

1 个答案:

答案 0 :(得分:0)

如果通过设置设置,默认供稿网址将被重定向到FeedBurner。使用不受Feedburner设置影响的Feed网址将是更好的方法。可以使用的Feed网址 -

<!-- Post HTML is not present -->
https://name.blogspot.com/feeds/posts/summary

<!-- Alternate URL for full feed -->
https://www.blogger.com/feeds/BLOGID/posts/default

<!-- in JSON format, the Feedburner redirect will be ignored -->
https://name.blogspot.com/feeds/posts/default?alt=json
相关问题