Git Product home page Git Product logo

ytscheduledvideos2ical's People

Contributors

jy95 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ytscheduledvideos2ical's Issues

Reverse engineering : New Creator Studio

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 ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.