【问题标题】:Adding item.title to item.link in Yahoo Pipes在 Yahoo Pipes 中将 item.title 添加到 item.link
【发布时间】:2014-05-23 02:11:09
【问题描述】:

我需要构建一个 Yahoo!复制 item.title 元素并将其添加到 item.link 元素末尾的管道

示例输入:

<item>
  <title>helloworld</title>
  <link>http://www.example.com/abc</link>
</item>
<item>
  <title>whatsup</title>
  <link>http://www.example.com/def</link>
</item>

示例输出:

<item>
  <title>helloworld</title>
  <link>http://www.example.com/abc?helloworld</link>
</item>
<item>
  <title>whatsup</title>
  <link>http://www.example.com/def?whatsup</link>
</item>

【问题讨论】:

    标签: regex rss yahoo-pipes


    【解决方案1】:

    您可以使用 Regex 运算符来做到这一点,通过在替换模式中使用 ${...} 表示法来引用其他字段,在本例中为 ${title}

    • 在: item.link
    • 替换: $
    • 与: - ${title}

    replace参数中我使用$匹配item.link的结尾,而在with${title}会被替换为@987654330的内容@,因此附加到item.link 的末尾。

    仅供参考,另一个问题涵盖了结合两个字段的更一般情况:

    In yahoo pipes, how can I combine 2 fields?

    【讨论】:

    • 工作就像一个魅力!谢谢雅诺斯 :)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-14
    • 1970-01-01
    相关资源
    最近更新 更多