Replies: 2 comments 19 replies
-
I couldn't find a reference that YouTube's PubSubHubbub is implemented with an RSS feed on their server. The difference between the RSS feed and PubSubHubbub is that the RSS feed requires a client to do periodic polling, whereas, for PubSubHubbub, a client gets a POST request from the server. So, in theory, the notification from PubSubHubbub should be instant, unless the YouTube server uses a mechanism that introduces some delay. I haven't measured the delay for their PubSubHubbub, but if you want to control the delay, you can use their RSS feed with periodic polling with a short interval, although it will be less efficient than using PubSubHubbub |
Beta Was this translation helpful? Give feedback.
-
I have my script running since yesterday. Yesterday it notified about the uploads. Twice about the same live stream, but at least I got the notification. But today it has not been giving notifications. No errors, nothing. What is the best way to debug this? It's important that the library would be reliable and it should at least throw an exception if something is not right. This is my current script: from pyngrok import ngrok
from ytnoti import YouTubeNotifier, Video
from datetime import datetime
channel_ids = [
"channelid1",
"channelid2",
"channelid3",
"channelid4",
"channelid5"
]
ngrok.set_auth_token("mytoken")
notifier = YouTubeNotifier()
@notifier.upload()
async def listener(video: Video):
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
print(f"[{timestamp}] New video properties:")
for key, value in vars(video).items():
print(f"{key}: {value}")
notifier.subscribe(channel_ids)
notifier.run() |
Beta Was this translation helpful? Give feedback.
-
If I understand correctly, PubSubHubbub is based on YouTube's RSS feed. In my experience, the RSS feed updates anywhere from 0 to 20 minutes after an upload, so the notification is far from instant.
Is there a way to get instant notifications about uploads?
Beta Was this translation helpful? Give feedback.
All reactions