【发布时间】:2014-05-23 03:15:18
【问题描述】:
在这个网站:(http://feeds.feedburner.com/aflcomau),有很多我想获得的元素在我自己的网站上显示。我想要获取的元素是每条新闻的标题、发布时间、描述以及每条新闻中的图片。
在他们的网站上他们有:
<h3 id="currentFeedContent">Current Feed Content</h3>
<ul>
<li class="regularitem" xmlns:dc="http://purl.org/dc/elements/1.1/">
<h4 class="itemtitle">
<a href="http://feedproxy.google.com/~r/aflcomau/~3/mR0Dt1yzINw/are-you-old-enough">Are you old enough? </a>
</h4>
<h5 class="itemposttime">
<span>Posted:</span>Thu, 22 May 2014 23:54:24 GMT</h5>
<div class="itemcontent" name="decodeable"><img width="60" style="float:right;" src="http://www.afl.com.au/staticfile/AFL Tenant/Media/Images/292275-tlssmallthumbnail.jpg" alt="2013 NAB AFL U18 Championship - Vic Metro v SA">
<p>Four gun draftees have different takes on the best age to join AFL ranks</p><img src="http://feeds.feedburner.com/~r/aflcomau/~4/mR0Dt1yzINw" height="1" width="1" style="display: none !important;"></div>
</li>
<li class="regularitem">
<h4 class="itemtitle">
<a href="http://feedproxy.google.com/~r/aflcomau/~3/6O720TT5QWA/tigers-back-hardwick-">Tigers back Hardwick </a>
</h4>
<h5 class="itemposttime">
<span>Posted:</span>Thu, 22 May 2014 22:41:05 GMT</h5>
<div class="itemcontent" name="decodeable"><img width="60" style="float:right;" src="http://www.afl.com.au/staticfile/AFL Tenant/Media/Images/325961-tlssmallthumbnail.jpg" alt="AFL 2014 Rd 07 - Geelong v Richmond">
<p>Tigers president breaks silence to back her embattled coach</p><img src="http://feeds.feedburner.com/~r/aflcomau/~4/6O720TT5QWA" height="1" width="1" style="display: none !important;"></div>
</li>
</ul>
有谁知道如何将它放入一个数组中,其中有许多包含Headline、TimePosted、Description 和Image 数组的新闻项目?
【问题讨论】:
-
这些网站有 RSS 源吗?
-
@Machavity:是的,他们确实有 RSS 提要。网站上有一个名为
View Feed XML的链接。