Skip to content

Based on ytdl-core. Cloudflare ytdl worker responses have CORS headers for it to be usable from the front end.

License

Notifications You must be signed in to change notification settings

awesome-arjun11/ytdl-cfworker

Repository files navigation

ytdl-cfworker

Cloudflare ytdl worker to be used as Video Info API from frontend js. YTDL-CFWorker responses has CORS headers for it to be usable from front end. Based on ytdl-core.


Deploying

Install wrangler

update wrangler.toml with your Cloudflare Account ID and run $ wrangler config

then

// install dependencies
$ npm i
// publish on cloudflare
$ npm run publish

Endpoints

  1. /basicinfo/<youtube-video-id>

    Response: JSON with video info and formats. Similar to ytdl-core's ytdl.getBasicInfo()

  2. /info/<youtube-video-id>

    Response: JSON with video info and parsed formats (including Dash MPD & HLS m3u links). Similar to ytdl-core's ytdl.getInfo()

ToDO

  1. Clean responses
  2. More Enpoints

About

Based on ytdl-core. Cloudflare ytdl worker responses have CORS headers for it to be usable from the front end.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published