无法使用此jquery代码解析stackoverflow feed

时间:2013-08-17 19:50:12

标签: jquery rss

使用

http://designshack.net/tutorialexamples/rss-feed-list/index.html(教程http://designshack.net/articles/javascript/build-an-automated-rss-feed-list-with-jquery/演示)

我刚刚将https://stackoverflow.com/feeds添加到列表中 但它没有被解析,而其他人被正确解析为什么?

<!doctype html>
<html lang="en-US">
<head>
  <meta charset="utf-8">
  <meta http-equiv="Content-Type" content="text/html">
  <title>Automated jQuery RSS Feed Demo</title>
  <meta name="author" content="Jake Rocheleau">
  <link rel="shortcut icon" href="http://designshack.net/favicon.ico">
  <link rel="icon" href="http://designshack.net/favicon.ico">
  <link rel="stylesheet" type="text/css" media="all" href="css/styles.css">
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  <script type="text/javascript" language="javascript" src="js/parser.js"></script>
</head>

<body>
 <div id="topbar"><a href="http://designshack.net">Back to Design Shack</a></div>

  <div id="w">
    <div id="content">
      <h1>Automated jQuery RSS Feed Listing</h1>

      <div id="nouperss" class="feedcontainer"></div>
      <hr>
      <div id="hongkiatrss" class="feedcontainer"></div>
      <hr>
      <div id="designmodorss" class="feedcontainer"></div>
      <hr>
      <div id="codropsrss" class="feedcontainer"></div>
    </div><!-- @end #content -->
  </div><!-- @end #w -->
<script type="text/javascript">
$(function(){
  parseRSS('https://stackoverflow.com/feeds', '#stackrss');
  parseRSS('http://feeds2.feedburner.com/24thfloor', '#hongkiatrss');
  parseRSS('http://feeds.feedburner.com/designmodo', '#designmodorss');
  parseRSS('http://feeds2.feedburner.com/tympanus', '#codropsrss')
});
</script>
</body>
</html>

1 个答案:

答案 0 :(得分:0)

SO提要采用Atom格式,而不是RSS,因此ParseRSS()函数无法正确解析。