Yahoo Pipes:替换 RSS 提要中的项目
我的雅虎管道有问题。
我正在尝试获取位于 item.title (RSS feed)末尾的 url 我想在 item.link 中使用该网址
我使用正则表达式来获取网址 (((f|ht){1}tp://)[-a-zA-Z0-9@:%_+.~# ?&//=]+) 并且效果很好。
但我如何使用它来将其用于 item.link ?
现在它看起来像这样:
..
<item>
<title>
Hello this is a test http://www.google.com
</title>
<link>
http://otherurl
</link>
<description>
Hello this is a test http://www.google.com
</description>
<guid isPermaLink="false">
http://otherurl
</guid>
<pubDate>Tue, 24 Jan 2012 18:27:18 +0000</pubDate>
</item>
..
我想让它像这样:
..
<item>
<title>
Hello this is a test http://www.google.com
</title>
<link>
http://www.google.com
</link>
<description>
Hello this is a test http://www.google.com
</description>
<guid isPermaLink="false">
http://otherurl
</guid>
<pubDate>Tue, 24 Jan 2012 18:27:18 +0000</pubDate>
</item>
..
I'm having a problem with Yahoo pipes.
I'm trying to get the url which is located at the end of the item.title (RSS feed)
I want to use that url in item.link
I use a Regex to get the url (((f|ht){1}tp://)[-a-zA-Z0-9@:%_+.~#?&//=]+) and that works fine.
But how can i use this to use it for item.link?
Now it looks like this:
..
<item>
<title>
Hello this is a test http://www.google.com
</title>
<link>
http://otherurl
</link>
<description>
Hello this is a test http://www.google.com
</description>
<guid isPermaLink="false">
http://otherurl
</guid>
<pubDate>Tue, 24 Jan 2012 18:27:18 +0000</pubDate>
</item>
..
And I want to make it like this:
..
<item>
<title>
Hello this is a test http://www.google.com
</title>
<link>
http://www.google.com
</link>
<description>
Hello this is a test http://www.google.com
</description>
<guid isPermaLink="false">
http://otherurl
</guid>
<pubDate>Tue, 24 Jan 2012 18:27:18 +0000</pubDate>
</item>
..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 Regex 模块 复制
item.title
到item.link
然后修改item.link
:1) 在
item.link
中将.*
替换为${标题}
2)在
item.link
中,将".* "
(不带引号,注意末尾的空格)替换为""
(空)Use the Regex module to copy
item.title
toitem.link
an then modifyitem.link
:1) In
item.link
replace.*
with${title}
2) In
item.link
replace".* "
(without quotes, note the space at the end) with""
(empty)我找到了!应该是
它会选择所有内容,直到找到一个 url!
I found it! It should be
it will select everything until it founds a url!