Youtube Data API v3: Sort by date not working

倖福魔咒の 提交于 2019-11-30 01:19:22

问题


The sorting is not working as expected since a few hours.

https://www.googleapis.com/youtube/v3/search?order=date&part=snippet&channelId=UC_x5XG1OV2P6uZZ5FSM9Ttw&key=YOUR_API_KEY

Can be tried in the API explorer (Execute without OAuth) as well.

https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.search.list?part=snippet&channelId=UC_x5XG1OV2P6uZZ5FSM9Ttw&order=date

date: Resources are sorted in reverse chronological order based on the date they were created.

https://developers.google.com/youtube/v3/docs/search/list

What is going wrong?


回答1:


In case you are looking to get the latest videos of a channel:

  • Get the channels upload playlist from Channels
  • Get the latest videos in the channels upload playlist from PlaylistItems

Alternatively, you can use the channels RSS feed:

  • https://www.youtube.com/feeds/videos.xml?channel_id={ChannelId}
  • https://www.youtube.com/feeds/videos.xml?user={User}

This does not replace the full search sorted by date function however.

Thanks YouTube for making me work on a Sunday, all I wanted was to watch the latest videos from my favorite channels. At least I don't have to wait for a fix anymore, good luck to those less lucky!




回答2:


Reports in Google's forum were commented by a Google employee: https://support.google.com/youtube/thread/2494861?msgid=2520468

YouTube is aware the search/sorting functions aren't working as expected – this is temporary and part of our efforts to better respond, review and remove graphic, violative content from YouTube. Thanks for your patience while we work through this. Will update this thread when these features are working normally again, feel free to subscribe for updates.




回答3:


Bug reports for this include:

https://issuetracker.google.com/issues/128673031

https://issuetracker.google.com/issues/128673552

Both have an official comment from Google:

Thank you all for bringing this up here. These specific filters have been currently disabled on both YouTube.com and through the APIs. We should have updates on this soon. Thanks again.




回答4:


Not sure how credible that is:

Just confirming that this is only temporary, and related to YouTube's efforts to better respond, review and remove graphic, violative content from YouTube. Thanks for your patience while we work through this.

https://www.reddit.com/r/youtube/comments/b1plj5/sort_by_upload_date_not_working/eiojtjh/



来源:https://stackoverflow.com/questions/55195054/youtube-data-api-v3-sort-by-date-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!