【问题标题】:Extract html tag from content:encoded in Yahoo Pipes从内容中提取 html 标签:在 Yahoo Pipes 中编码
【发布时间】:2014-08-30 19:19:24
【问题描述】:

这是我的管道:link

我需要获取内容内的img标签的src属性:编码

这是提要的内容:编码:

<p style="text-align:justify;"><img class="alignnone size-full wp-image-49549" src="http://i2.wp.com/heshootshescoores.com/wp-content/uploads/2014/08/nhl.jpg?resize=600%2C400" alt="nhl"/></p>
<p style="text-align:justify;">...etc.

所以在这个例子中我想提取这个链接:ttp://i2.wp.com/heshootshescoores.com/wp-content/uploads/2014/08/nhl.jpg?resize=600%2C400

并将这个属性导出到一个新的 item.media:thumbnail 中

<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" 
url="HERE GOES THE SRC ATTRIBUTE.png"/>

是否可以使用 Yahoo!管道?(我在考虑正则表达式,但我不熟悉,我什至不知道从哪里开始。)

谢谢


FU问题:https://stackoverflow.com/questions/25605740/add-items-attribute-in-yahoo-pipes

【问题讨论】:

    标签: regex rss feed src yahoo-pipes


    【解决方案1】:
       (.*?)(?=src=)src=\"(.*?)\"(.*)
    

    这会起作用。

    查看演示。

    http://regex101.com/r/bJ6rZ5/3

    【讨论】:

    • 既然我有一个新问题,我将创建一个新的单独问题。谢谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-08
    • 2012-09-03
    相关资源
    最近更新 更多