从rss供稿项链接中找出rss供稿链接

时间:2017-06-16 06:59:41

标签: xml firebase firebase-realtime-database rss zapier

我正在使用Zapier轮询多个RSS源并将新的RSS源项目存储到Firebase中。以下是我从Zapier获得的项目的详细信息。

enter image description here

但是有一个问题,我没有得到该项目的RSS提取。

为了处理进一步的逻辑,我想找出RSS提要的实际链接,从中获取RSS提要项。

有没有办法从项目的链接中找到RSS提要链接?

e.g。从Sample Item Link我可以得到RSS feed Link

1 个答案:

答案 0 :(得分:0)

创建“Zapier代码”步骤,分析link网址以确定Feed源。例如:

http://imgur.com/a/IOi4n

var feed = "N/A";

if (inputData.link.startsWith('http://economictimes.indiatimes.com')) {
    feed = "indiatimes";
} else if (inputData.link.startsWith('http://some-other-site.com')) {
    feed = "other";
}

output = [{feed: feed}];

然后,您的下一步可以分析“Feed”值是什么,并决定如何继续。