/browser-ytdl-core

Browser build for 'node-ytdl-core': YouTube video downloader in pure javascript.

Primary LanguageJavaScriptGNU General Public License v2.0GPL-2.0

Browser build for node-ytdl-core: YouTube video downloader in pure javascript

Build

npm install

npm run build

CDN

  <script src="//cdn.jsdelivr.net/npm/@warren-bank/browser-ytdl-core@4.14.4-distubejs.4/dist/es2020/ytdl-core.js"></script>

Usage

  1. run the client-side javascript library in a web browser
    • examples:
      1. userscript
        • domain: youtube.com
        • notes:
          • Youtube API calls made by browser-ytdl-core succeed
          • CORS is allowed
      2. userscript with "cors-anywhere" proxy
        • domain: example.com
        • notes:
          • usage of the "cors-anywhere" demo server first requires user interaction
            • visit the site to click a button
            • this adds the requesting IP to a whitelist, and grants access for a limited period of time
          • this proxy injects HTTP response headers that allow CORS

Legal