如何收听新的 YouTube 视频?
How to listen for new YouTube videos?
我正在开发 firebase 项目,该项目应该提供对特定 YouTube 频道的搜索。
通过 YouTube API 我可以将此频道的可用视频编入索引。
我的问题是:
为新创建的视频编制索引的最佳方式是什么?是否有某种 event/trigger/notification 我可以与 google 云功能挂钩?如果可能的话,我想避免轮询。
您似乎正在寻找一种订阅通知(新创建的视频)的方法。 Youtube API 提供了一种使用 PubSubHubbub 服务器执行此操作的方法(不,这不是拼写错误)。
Your PubSubHubbub callback server receives Atom feed notifications when a channel does any of the following activities:
- uploads a video
- updates a video's title
- updates a video's description
我正在开发 firebase 项目,该项目应该提供对特定 YouTube 频道的搜索。
通过 YouTube API 我可以将此频道的可用视频编入索引。
我的问题是:
为新创建的视频编制索引的最佳方式是什么?是否有某种 event/trigger/notification 我可以与 google 云功能挂钩?如果可能的话,我想避免轮询。
您似乎正在寻找一种订阅通知(新创建的视频)的方法。 Youtube API 提供了一种使用 PubSubHubbub 服务器执行此操作的方法(不,这不是拼写错误)。
Your PubSubHubbub callback server receives Atom feed notifications when a channel does any of the following activities:
- uploads a video
- updates a video's title
- updates a video's description