How would I go about listening for an upload event on a specific channel with the Youtube API. I have a system in place but it can only check a certain amount of times before the rate limit is implemented.
Cheers, Agent
CodePudding user response:
Ok, so Youtube has a feed (url: https://www.youtube.com/feeds/videos.xml?channel_id=%channel_id%) that I believe doesn't have a rate limit. Therefore, by editing my code to get the latest entry and get the video id from that, my code works. I found that url from line 115 in here
CodePudding user response:
I susgest you have a look at Subscribe to Push Notifications section of the documentation.
The YouTube Data API (v3) supports push notifications via PubSubHubbub, a server-to-server publish/subscribe protocol for Web-accessible resources.
Use the Google hub to subscribe to receive push notifications:
- Set the mode to subscribe. (Or set the mode to unsubscribe to cancel a >subscription.)
- Set the callback URL to the URL that you set up in step 1.
- Set the topic URL to https://www.youtube.com/xml/feeds/videos.xml?>channel_id=CHANNEL_ID, where CHANNEL_ID is the YouTube channel ID for which you want to retrieve push notifications.