Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

I don't get the latest video from a Channel with Youtube API

$
0
0

I am new to coding with the Youtube API. When I run my code, it doesn't always give me the latest video from my selected Channel (the target video was uploaded on: 03-Sep-2023).

Example of code that I'm using:

request_videos = youtube.search().list(order='date',channelId = identifiant, part='snippet', type='video', maxResults=1)

This is the returned result from the API:

JOYCA['kind': 'youtube#searchListResponse', 'etag': '02zCYj4jrMn08FxGFug-fuBXNLO', 'nextPageToken': 'CAEQAA', 'regionCode': 'FR', 'pageInfo': ('totalResults': 392, 'results PerPage': 1), 'items': [{'kind': 'youtube#searchResult', 'etag': 'kE6y5R30Aoa TuP53yKyvW5zsAo', 'id': ['kind': 'youtube#video', 'videoId': 'MrE3zS0ecdE'}, 'snippet': [ 'publishedAt': '2023-08-27T12:20:20Z', 'channelId': 'UCow21Gnug113Xazkrc5jM_Q', 'title': 'TIK TOK M'A FAIT ACHETER CA ! #5 (C'est une folie ça)', 'description : 'Vous pouvez télécharger REVOLUT gratuitement avec mon lien : https://revolut.onelink.me/z41F/joyca Vous pourrez débloquer les ...', 'thumbnails': ('default': ['url' : 'https://i.ytimg.com/vi/MrE3zS0ecdE/default.jpg', 'width': 120, 'height': 90), 'medium': ('url': 'https://i.ytimg.com/vi/MrE3zS0ecdE/mqdefault.jpg', 'width': 320, 'h eight: 180), 'high': {'url': 'https://i.ytimg.com/vi/MrE3z50ecdE/hqdefault.jpg', 'width': 480, 'height': 360}}, 'channelTitle': 'JOYCA", 'liveBroadcastContent': 'none ', 'publishTime': '2023-08-27T12:20:20Z"}}]}

editor's note: The above text is auto-extracted from this provided image (ie: it's added here for illustration purposes only, it cannot (and does not need to) be tested).

  • Expected (correct) "latest video" result:


  • Actually returned (by API) code result:


What I've tried:
I tried to check if it's not a latency issue related to the API, but it's not.
I modified the requests but still nothing.

I tested with another ID on different channels, and it's the same issue, even though for some, I have no account/user problems.

I checked the quotas, just in case, but there's nothing there either.

Expected result:
What I would like is to be able to get the latest videos that come out, maybe not instantly but at least with a maximum delay of 3 hours to 1 day


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>