0

使用

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>
4

1 回答 1

0

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

于 2013-08-17T20:55:00.943 回答