Getting a video's publish date - not upload date

随声附和 提交于 2019-12-13 18:26:29

问题


Using Youtube's Data API V3, I am trying to get the date at which the video was published i.e. the date you see displayed here on the watch page:


(source: gyazo.com)

Using the API, I have only been able to get the upload date which obviously doesn't get affected by scheduled releases.

At first I tried using playlistItems on the user's upload playlist. I soon found out that the published at date was actually the date this item was added to the playlist (which in this cases is the upload date)

I then turned to using videos with the id fetched from the upload playlist. I assumed since I was no longer using data from within a parent list, the publishedAt would be the actual published at date, but no, still the upload date.

None of the parts including status, snippet, and statistics give the published date.

So... How do I get such a date?

Thank you.


回答1:


In videos/list, with snippet part, you now have snippet.publishedAt, which is the date on the watch page (and the one used to build the subscriptions feed).



来源:https://stackoverflow.com/questions/26686642/getting-a-videos-publish-date-not-upload-date

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