32279

Are upload playlists on Youtube API v3 purpsofully slow to be updated?

Question:

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:

https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&order=date&channelId={channelId}&key={api_key}

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.

Recommend

  • Why is Python strict about indentation? [closed]
  • How to invoke another servlet in a servlet? [duplicate]
  • Do I need to define `operator==` to use my class with standard containers?
  • Size of NSArray
  • How to enumerate Azure subscriptions and tenants programmatically?
  • ASP.NET 5: Error with Nuget package in Class library Package
  • 403 forbidden error while sending messages to facebook connector through Unification Engine API
  • Selenium c#: WaitForCondition (how to find when ajax page is fully loaded)
  • Transpose table then set and rename index
  • ConfigurationBuilder not working in azure function
  • CSS how to fix an element to scroll horizontally with the page but not vertically?
  • Converter from SAT to 3-SAT
  • Unable to play media with vlc ocx
  • Excel VBA How to populate a multi-dimensional (3d) array with values from multiple excel ranges?
  • Can my PDF ping my server when it is opened?
  • How to retrieve information from antrun back to maven?
  • android google indoor map
  • How to generate and display a QR Code in ionic 2
  • MonoTouch: How to download pdf incrementally as indicated in the Apple slides “Building Newsstand Ap
  • Get history of file changes from TFS to implement custom “blame”-behaviour of exceptions
  • How to run “Deployd” on port 80 instead of port 5000 in webserver.
  • iOS: Detect app start via notification press
  • How to attach a node.js readable stream to a Sendgrid email?
  • Typescript - Unable to get 'import' statement to function
  • Installing Hadoop, Java Exception about illegal characters at index 7?
  • Is there any way to access browser form field suggestions from JavaScript?
  • RectangularRangeIndicator format like triangular using dojo
  • Cross-Platform Protobuf Serialization
  • Shallow update not allowed (git > 1.9)
  • Hazelcast - OperationTimeoutException
  • RestKit - RKRequestDelegate does not exist
  • How do I rollback to a specific git commit
  • Unit Testing MVC Web Application in Visual Studio and Problem with QTAgent
  • Revoking OAuth Access Token Results in 404 Not Found
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Change div Background jquery
  • How does Linux kernel interrupt the application?
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • Busy indicator not showing up in wpf window [duplicate]
  • Why do underscore prefixed variables exist?