我有RSS提要。我想立即用WebSub服务器更新关于我的帖子的信息。我选择了Google服务器https://pubsubhubbub.appspot.com/。服务器主页上有一条指令:
在// Atom :feed下为Atom提要添加//atom:link标记,或在// RSS :rss/channel下为RSS提要添加一个链接标记。//atom:link标记应该将rel属性设置为hub,href属性设置为https://pubsubhubbub.appspot.com/
我不明白or under //rss:rss/channel for RSS feeds是什么意思?根据指示,我必须添加一个链接到我的feed.xml频道部分。但是我不明白这个链接应该是什么样子?
我找到了原子提要这里的示例。原子链接应该如下所示:
<link rel="hub" href="https://pubsubhubbub.appspot.com/" xmlns="http://www.w3.org/2005/Atom" />无法找到RSS提要的任何示例。有什么想法吗?
这是我的feed.xml的一个例子:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>Примеры фида RSS в Google Новостях</title>
<link>https://www.mysite.ua/static/rss/newsline.xml</link>
<description>Это примеры фида RSS в Google Новостях.</description>
<lastBuildDate>Fri, 23 Jan 2015 23:26:19 +0000</lastBuildDate>
<item>
<guid>https://mysite.ua/url-post.html</guid>
<pubDate>Fri, 23 Jan 2015 23:17:00 +0000</pubDate>
<title>Example 1</title>
<description>Desc</description>
<content:encoded>
<![CDATA[<p>Lorem ipsum dolor ]]>
</content:encoded>
<link>http://examples.com/sample-post.html</link>
<author>pochta@example.com (Anna Name)</author>
<enclosure url="https://examples.com/img/1300x820.jpg" type="image/jpeg" length="0"/>
</item>
</channel>
</rss>发布于 2021-10-15 14:19:43
“下面/rss:rss/channel”是指位于<channel>标记之下的<rss>标记之下。
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<link rel="hub" href="https://pubsubhubbub.appspot.com/" xmlns="http://www.w3.org/2005/Atom" />
</channel>
</rss>https://stackoverflow.com/questions/64683331
复制相似问题