Skip to content

Latest commit

 

History

History

instructions

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

YouTube Cookies

Steps : -

  • Open your browser, then open dev-tools [ Option + ⌘ + J (on macOS), or Shift + CTRL + J (on Windows/Linux). ]

  • Then go to Network Tab image

  • Go to any YouTube URL and find the first request and open it First Request :- image

The first request would be watch?v="Your video ID"

  • Now go to Request Headers image

  • find cookie in request headers image

  • Now just create a new file with this code :

    const play = require('play-dl');
    
    play.authorization();

    And run this file. You will get a interface asking some question.

Spotify

  1. Go to Spotify Dashboard and create a new application or use old one. image

  2. Open that application. You will be given 2 things [ Client ID and Client Secret ( click on Show Client Secret to get info ) ]. Note these 2 things somewhere.

  3. Click on Edit Settings and go to Redirect URIs image

  4. Add this Redirect URI : http://127.0.0.1/index.html or any url according to you. [ Also note this somewhere ]

  5. Now create a authorize.js file and add this code :

    const play = require('play-dl');
    
    play.authorization();

    and run it node authorize.js

  6. You will be asked :-

    • Saving INFO in file or not. [ If selected no, you will have to use setToken function after you get refresh-Token ]
    • Client ID
    • Client Secret
    • Redirect URI or Redirect URL
    • Market [ Choose 2 letter code on left side of your country name from url ]
    • You will be given a link for authorizing. Just paste it in your browser and click on authorize and copy the link that you are redirected to. [ Redirected Link should start with Redirect URI / Redirect URL that you have provided ]
    • Paste the url in Redirected URL
  7. You have completed Authorization part. Now you can delete authorize js file.

You will notice that a folder named .data has been created. Do not delete this, this contains all your spotify data. [ Only applicable if save in file is set to yes. ]

SoundCloud

Getting Free Client ID

const play = require('play-dl')

play.getFreeClientID().then((clientID) => {
    play.setToken({
      soundcloud : {
          client_id : clientID
      }
    })
})