I have a line of python code in my bot:
playlist_snippet = self.youtube.playlistItems().list( playlistId=playlistId, part='snippet', maxResults=50, pageToken=next_page_token ).execute()
The playlistId is the id of the user upload playlist. I've noticed that this seems to be updated 10 - 50 mins after the playlist is updated on the youtube website and also the equivalent API v2 call.
Is there a better API call to make? Is this purposefully untimely?
p.s. for anyone interested this is my code: <a href="https://github.com/notatallshaw/arandabot/blob/master/ytvideos.py" rel="nofollow">https://github.com/notatallshaw/arandabot/blob/master/ytvideos.py</a>
<strong>Edit:</strong> The more I test this the more I get examples of it taking over an hour to update the user upload playist via API v3 vs. the website or API v2.Answer1:
Yep I have noticed this to, I run a bot that is pretty reliant on speed and this is the only reason I have been using v2 instead of v3, v3 is so god damn slow. But now that Google is shutting down v2 it's time to move. The fastest endpoint i've found in v3 is the search one, it usually takes like 60-120 seconds to update(the v2 uploads endpoint updated immediately)
Use it like this:
and it will give you the latest upload from the specified channel. Also, having:
'Cache-Control': 'max-age=0, no-cache' in your headers helps a good bit too.