使用 Yahoo Pipes 使推文链接到它们包含的 URL 而不是 Twitter

发布于 2024-08-27 00:45:19 字数 73 浏览 7 评论 0原文

我想知道如何使用 Yahoo Pipes 获取任何包含 url 的推文,以便在单击时链接到该 url,而不是链接到 Twitter。

I'm wondering how you can use Yahoo Pipes to get any tweets than contain a url to link to that url when clicked, instead of linking to Twitter.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

洛阳烟雨空心柳 2024-09-03 00:45:19

我做了一些假设。

  • 如果消息中有多个链接,您需要第一个 URL
  • 如果没有 URL,您将跳过该推文
  • 您只关心 http 和 https 链接

流程最终为:

  • 1 Fetch Feed - 使用 twitter RSS
  • 2 过滤 - item.description 匹配正则表达式 https?://
  • 3 重命名 - item.描述 复制为link
  • 4 正则表达式 - 在item.link 中替换^.*?(https?:// [\w:#@%/;$()~?+-=\.&]+).*$$1 (s)

如果您想查看所有推文,那么最简单的事情就是在顶部拆分 feed,过滤带 URL 和不带 URL 的 feed,只处理 URL 的 feed。最后,您可以在输出之前重新合并提要。

如果您想要更多 url 类型,请在步骤 2 和 4 中将 https?:// 更改为 (https?|ftp|etc)://

我制作了一个示例 < a href="http://pipes.yahoo.com/pipes/pipe.info?_id=e791303aab6722d25e6fbbef0c9d7c27" rel="nofollow noreferrer">此处。

I made some assumptions.

  • You want the first URL if there are multiple links in the message
  • If there is no URL, you will skip the tweet
  • You only care about http and https links

The flow ends up:

  • 1 Fetch Feed - Use twitter RSS
  • 2 Filter - item.description Matches regex https?://
  • 3 Rename - item.description Copy As link
  • 4 Regex - In item.link replace ^.*?(https?://[\w:#@%/;$()~?+-=\.&]+).*$ with $1 (s)

If you want to see all tweets, then the simplest thing is to split the feed at the top and filter the ones with and without URLs and only process the URL ones. Finally you can remerge the feeds before outputting.

If you want more url types, change the https?:// to (https?|ftp|etc):// in step 2 and 4

I made a sample here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文