如何像该网站那样提取博客文章?

发布于 2024-11-05 17:47:20 字数 1180 浏览 0 评论 0 原文

此网站基于 Ning 构建。您会注意到他们在主页上设置了 jQuery 选项卡,并查看源代码,您会发现这些选项卡从外部 url 获取内容(如下):

<div class="ui-tabs" id="tabs"> 
     <ul> 
          <li><a href="http://friendsorenemies.com/vip/blog/embedPromoted?pageSize=10">Features</a></li> 
          <li><a href="http://friendsorenemies.com/vip/blog/embedVip?pageSize=10">Vip Blogs</a></li> 
          <li><a href="http://friendsorenemies.com/vip/blog/embedAll?pageSize=10">All</a></li> 
     </ul>
</div>

但是,这些 url 对于 Ning 来说不是标准的(我尝试在 /vip/blog/embedPromoted?pageSize=10 rel="nofollow">类似的 Ning 博客 url 并且不起作用),这让我相信它们是单独创建的,只是为了提取博客文章。以下是 Ning 上的博客页面,供参考:链接

知道他们如何仅使用博客文章创建这些页面吗?我最初想使用博客的 rss feed 但意识到RSS 不包括作者头像和某些帖子元数据信息,例如我上面发布的第一个链接中的信息。

任何帮助将不胜感激。

提前感谢大家!

This site is built on Ning. You'll notice they have jQuery tabs set up on the home page and looking through the source code, you'll see that those tabs are getting their content from an outside url (below):

<div class="ui-tabs" id="tabs"> 
     <ul> 
          <li><a href="http://friendsorenemies.com/vip/blog/embedPromoted?pageSize=10">Features</a></li> 
          <li><a href="http://friendsorenemies.com/vip/blog/embedVip?pageSize=10">Vip Blogs</a></li> 
          <li><a href="http://friendsorenemies.com/vip/blog/embedAll?pageSize=10">All</a></li> 
     </ul>
</div>

However, those urls aren't standard to Ning (I've tried appending /vip/blog/embedPromoted?pageSize=10 on a similar Ning blog url and it didn't work) which leads me to believe that they were created separately somehow to extract just the blog posts. Here is what a blog page on Ning looks like for reference: link

Anybody have an idea of how they created these pages with just the blog posts? I originally thought of using the blog's rss feed but realized the rss doesn't include author avatars and certain post metadata information like how it is in the first link I posted above.

Any help would be hugely appreciated.

Thanks to all in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

空‖城人不在 2024-11-12 17:47:20

该 Ning 站点上的 /vip URL 是 Ning 用于托管自定义 PHP 代码时的自定义功能。由于它是自定义功能,因此在其他网站上不可用。

可以使用 Ning API 创建类似的内容来聚合博客内容将一组特定的成员放入单个 HTML 页面或 RSS 提要中。它必须在外部服务器上实现。

The /vip URLs on that Ning site is a custom feature from when Ning used to host custom PHP code. Since it's a custom feature, it's not available on other sites.

It's possible to create something similar using the Ning API to aggregate blog content from a specific set of members into a single HTML page or RSS feed. It would have to be implemented on an external server.

泪之魂 2024-11-12 17:47:20

查看 rssinclude.com,这是将 RSS 提要放入网站的便捷方法。

如果这不起作用,您可以使用 QueryPath 库从网站 jQuery 样式中获取 HTML,但使用 PHP 。

Check out rssinclude.com, handy way to drop RSS feeds into a site.

If that won't work, you can use the QueryPath library to grab the HTML from the site jQuery style, but in PHP.

萤火眠眠 2024-11-12 17:47:20

rss feed 不包含作者的头像 是什么意思?它包含在您 OP 中的链接中。

实现这一点的一种方法是,他们将 XSLT 模板应用于 RSS 提要来构建 HTML 页面。

What do you mean by rss feeds don't include the author's avatar ? It is included in the link you have in your OP.

One way this could have been implemented is that they apply a XSLT temnplate to a RSS feed to build the HTML page .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文