jy95 / ytscheduledvideos2ical Goto Github PK
View Code? Open in Web Editor NEWExtract your scheduled videos publish date to a ical file so that it allows you to to see your scheduling in your favorite calendar app
License: MIT License
Extract your scheduled videos publish date to a ical file so that it allows you to to see your scheduling in your favorite calendar app
License: MIT License
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) :
https://studio.youtube.com/youtubei/v1/creator/list_creator_videos?alt=json&key=[INNERTUBE_API_KEY]
Where [INNERTUBE_API_KEY] can be found, for example in the HTML body of a embeb video (here a TubeBuddy one) + query parameters
https://www.youtube.com/embed/ZlkPcrAlLoo?rel=0&showinfo=0
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)
// ... are the other properties I don't need
yt.setConfig({..., "INNERTUBE_API_KEY": "YOUR_INNERTUBE_API_KEY" })
The result of this request give a json that looks like this one :
{
"nextPageToken": "CAASUwom9_uFVAb_____Mk5JNXFjSHFRZlEA_wH__jJOSTVxY0hxUWZRAAEQHiHqXSSSBd3_5jkAAAAA-at6BEgBUAJaCwklcGPVpVuw1xACYL3XqocF",
"totalSize": "128",
"totalSizeAccuracy": "ACCURACY_ESTIMATION",
"videos": [
// A videoItem object
],
"videosTotalSize": {
"size": "128",
"accuracy": "ACCURACY_ESTIMATION",
"achievedTotalSizeAccuracy": "CREATOR_ACHIEVED_TOTAL_SIZE_ACCURACY_LOW"
}
}
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 property could be undefined since scheduledPublishingDetails is {} for public video
scheduledPublishingDetails.scheduledPublishings.scheduledTimeSeconds
This scheduledTimeSeconds can be easily converted to a Date item (since it is a Unix timestamp)
var scheduledTimeSeconds = 1534501800
new Date(scheduledTimeSeconds *1000).toISOString()
EDIT : Still not finished , I need to talk about the autorization field and the requested size for request ...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.