Open jy95 opened 6 years ago
The POST request can be resumed as (Warning : Firebug didn't copy the headers so I will do it manually later ) :
fetch("https://studio.youtube.com/youtubei/v1/creator/list_creator_videos?alt=json&key=[INNERTUBE_API_KEY]", {
"credentials": "include",
"headers": {},
"referrer": "https://studio.youtube.com/?utm_source=NONE&utm_campaign=upgrade&utm_medium=sidebar_button",
"referrerPolicy": "no-referrer-when-downgrade",
"method": "POST",
// the full request object : https://github.com/jy95/YTscheduledVideos2Ical/wiki/Request-object
"body": JSON.stringify({})
"mode": "cors"
});
This issue will resume all my discoveries about how the new interface ( https://studio.youtube.com ) got scheduled videos
When going on video tab , the following request is done (as POST Method) :
Where [INNERTUBE_API_KEY] can be found, for example in the HTML body of a embeb video (here a TubeBuddy one) + query parameters
in some script balise that begins with
yt.setConfig
within the key can be found in the object parameter (Full balise Path in document : iframe > html > body > script)The result of this request give a json that looks like this one :
A video object which was scheduled looks like this example in the wiki : https://github.com/jy95/YTscheduledVideos2Ical/wiki/VideoItem-Object
As you can see, in order to extract videos that are still scheduled is to filter videoItem that have this property
This scheduledTimeSeconds can be easily converted to a Date item (since it is a Unix timestamp)
EDIT : Still not finished , I need to talk about the autorization field and the requested size for request ...