{"_id":"@borodutch-labs/yt-dlp-exec","_rev":"1-054cef54911502daa7c9ea10d6879416","name":"@borodutch-labs/yt-dlp-exec","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@borodutch-labs/yt-dlp-exec","description":"A simple Node.js wrapper for yt-dlp","homepage":"https://github.com/Borodutch/youtube-dl-exec","version":"2.0.0","main":"src/index.js","author":{"name":"microlink.io","email":"hello@microlink.io","url":"https://microlink.io"},"contributors":[{"name":"Kiko Beats","email":"josefrancisco.verdu@gmail.com"},{"name":"Hazmi35","email":"contact@hzmi.xyz"},{"name":"Skick","email":"skick1234@gmail.com"},{"name":"Felix Kaiser","email":"felixkaiser2000@protonmail.com"},{"name":"Jiayang","email":"joeysun6@gmail.com"},{"name":"Onwuka Gideon","email":"dongidomed@gmail.com"},{"name":"Philipp Fruck","email":"dev@p-fruck.de"},{"name":"Samu698","email":"samu2altervista@gmail.com"},{"name":"Indian Ocean Roleplay","email":"indianoceanroleplay@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/microlinkhq/youtube-dl-exec.git"},"bugs":{"url":"https://github.com/microlinkhq/youtube-dl-exec/issues"},"keywords":["binary","nodejs","youtube-dl","youtube-dl-wrapper","youtube-downloader"],"dependencies":{"dargs":"~7.0.0","execa":"~5.1.0","is-unix":"~2.0.1","mkdirp":"~1.0.4","node-fetch":"~2.6.5"},"devDependencies":{"@commitlint/cli":"latest","@commitlint/config-conventional":"latest","ava":"latest","ci-publish":"latest","conventional-github-releaser":"latest","finepack":"latest","git-authors-cli":"latest","lint-staged":"latest","npm-check-updates":"latest","nyc":"latest","prettier-standard":"latest","simple-git-hooks":"latest","standard":"latest","standard-markdown":"latest","standard-version":"latest"},"engines":{"node":">= 12"},"scripts":{"clean":"rm -rf node_modules","contributors":"(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true","coverage":"nyc report --reporter=text-lcov | coveralls","lint":"standard-markdown README.md && standard","postinstall":"node scripts/postinstall.js","postrelease":"npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)","preinstall":"npx bin-version-check-cli python \">=2\"","prerelease":"npm run update:check && npm run contributors","pretest":"npm run lint","release":"standard-version -a","release:github":"conventional-github-releaser -p angular","release:tags":"git push --follow-tags origin HEAD:master","test":"nyc ava","update":"ncu -u","update:check":"ncu -- --error-level 2"},"license":"MIT","commitlint":{"extends":["@commitlint/config-conventional"]},"lint-staged":{"package.json":["finepack"],"*.js,!*.min.js,":["prettier-standard"],"*.md":["standard-markdown"]},"simple-git-hooks":{"commit-msg":"npx commitlint --edit","pre-commit":"npx lint-staged"},"types":"./src/index.d.ts","gitHead":"47420a70a45e8abc6058eb440e681a779a9d719a","_id":"@borodutch-labs/yt-dlp-exec@2.0.0","_nodeVersion":"17.1.0","_npmVersion":"8.1.3","dist":{"integrity":"sha512-qwLJM303307ofdjmCV2k5zidz/7hByEop4ky76Gjqdv2H/JAmOQNFKV1X97su+p39fx85jVVJMJeFUyeQzsi2A==","shasum":"5335fbda8de6e04f51391c306ce344574ac2d6fc","tarball":"https://registry.npmjs.org/@borodutch-labs/yt-dlp-exec/-/yt-dlp-exec-2.0.0.tgz","fileCount":7,"unpackedSize":19620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoAVACRA9TVsSAnZWagAAweAP/RETtxc6jAJ0CuyUWRL9\nrLrSCbm04401lFC3G18a6lK9PLOY31ICwxeN/NlS1OoJgh8IBVNoxSEgKaFB\nR1tPkgNQBlhiOF2voZaIee9wg1mmQeV6/aKa+IOtiqWpWDUsIzDO5umwHcJK\nfiVPHMoWaATlPVBhsraeXRm43N7SWsCI3POuIQy1Wuef5HDpVR1zfK4fp6Ym\nrRSUZyAIskssJcRrQjDGRPKUZzluFtLIHOilX1+uTBge8nAh4uP2ff/WETlZ\n/aOFrUURSQ2+GlAtmrEqN89YbNOn1T9Tr44gOwNdKdoQUp39k3aMoSCMVIly\nE10bxLDUd+dtRA+AufmpR1UYDLnbUTWYJsx2iye2u3n6IZLYSlDo1Ej3X6Cd\nAmi048k2PiXtkPbx6vHiNaiKe0l2LYqd8/FRvEz+PcL04y0jaHzh0xM98FjY\nTWzdGI22K4cYHaifLhBzr6aGa/fOQXZVlC3T90LcJiExDIcg5Yj9GKZeN1Nc\n4twvf0F6Ndia5i7nlBLW8AXNPjRjz0Mwbt7oNxed1v6UyoKZx8b+u6q5aSgm\nN9nnhzj6x0NbYFtP04EmqUH0B7p78l7JT2ckCxiwOAqkhJ64dmH3j9t1AGL1\niuOJum9QXiRpyvtT4KRRmxFplNbWuMq1XJvxiCSUhmaiIiFsYc9Hv8rEOAv8\nSoWh\r\n=htj9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFEGbwTlYYaRwSQv0qk4oDsnI2FsGaeLPOYuLS25MZZQIgdzFTo0UyiSwsbTwXUB87CWy/A/mo9cbjkjJYiXt9FCE="}]},"_npmUser":{"name":"upacyxou","email":"upacyxou@gmail.com"},"directories":{},"maintainers":[{"name":"upacyxou","email":"upacyxou@gmail.com"},{"name":"borodutch","email":"nikita@borodutch.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yt-dlp-exec_2.0.0_1637877056431_0.8630972649822739"},"_hasShrinkwrap":false}},"time":{"created":"2021-11-25T21:50:56.384Z","2.0.0":"2021-11-25T21:50:56.557Z","modified":"2022-04-04T20:13:12.900Z"},"maintainers":[{"name":"upacyxou","email":"upacyxou@gmail.com"},{"name":"borodutch","email":"nikita@borodutch.com"}],"description":"A simple Node.js wrapper for yt-dlp","homepage":"https://github.com/Borodutch/youtube-dl-exec","keywords":["binary","nodejs","youtube-dl","youtube-dl-wrapper","youtube-downloader"],"repository":{"type":"git","url":"git+https://github.com/microlinkhq/youtube-dl-exec.git"},"contributors":[{"name":"Kiko Beats","email":"josefrancisco.verdu@gmail.com"},{"name":"Hazmi35","email":"contact@hzmi.xyz"},{"name":"Skick","email":"skick1234@gmail.com"},{"name":"Felix Kaiser","email":"felixkaiser2000@protonmail.com"},{"name":"Jiayang","email":"joeysun6@gmail.com"},{"name":"Onwuka Gideon","email":"dongidomed@gmail.com"},{"name":"Philipp Fruck","email":"dev@p-fruck.de"},{"name":"Samu698","email":"samu2altervista@gmail.com"},{"name":"Indian Ocean Roleplay","email":"indianoceanroleplay@gmail.com"}],"author":{"name":"microlink.io","email":"hello@microlink.io","url":"https://microlink.io"},"bugs":{"url":"https://github.com/microlinkhq/youtube-dl-exec/issues"},"license":"MIT","readme":"<div align=\"center\">\n  <img src=\"https://cdn.microlink.io/logo/banner.png\">\n  <br>\n  <br>\n</div>\n\n![Last version](https://img.shields.io/github/tag/microlinkhq/youtube-dl-exec.svg?style=flat-square)\n[![Coverage Status](https://img.shields.io/coveralls/microlinkhq/youtube-dl-exec.svg?style=flat-square)](https://coveralls.io/github/microlinkhq/youtube-dl-exec)\n[![NPM Status](https://img.shields.io/npm/dm/youtube-dl-exec.svg?style=flat-square)](https://www.npmjs.org/package/youtube-dl-exec)\n\n> A simple Node.js wrapper for [youtube-dl](https://github.com/ytdl-org/youtube-dl).\n\n## Why\n\n- Auto install the latest `youtube-dl` version available.\n- Executes any command in an efficient way.\n- Promise & Stream interface support.\n\n## Install\n\n```bash\n$ npm install youtube-dl-exec --save\n```\n\n## Usage\n\n```js\nconst youtubedl = require('youtube-dl-exec')\n\nyoutubedl('https://example.com', {\n  dumpSingleJson: true,\n  noWarnings: true,\n  noCallHome: true,\n  noCheckCertificate: true,\n  preferFreeFormats: true,\n  youtubeSkipDashManifest: true,\n  referer: 'https://example.com'\n})\n  .then(output => console.log(output))\n```\n\nIt's equivalent to:\n\n```bash\n$ youtube-dl https://example.com --dump-single-json --no-warnings --no-call-home --no-check-certificate --prefer-free-formats --youtube-skip-dash-manifest --referer=https://example.com\n```\n\nThe library will use the latest `youtube-dl` available that will downloaded on [build](https://github.com/microlinkhq/youtube-dl-exec/blob/master/package.json#L70) time.\n\nAlternatively, you can specify your own binary path using [`.create`]():\n\n```js\nconst { create: createYoutubeDl } = require('youtube-dl-exec')\n\nconst youtubedl = createYoutubeDl('/my/binary/path')\n```\n\nYou can combine it with [YOUTUBE_DL_SKIP_DOWNLOAD](#youtube_dl_skip_download). See [environment variables](#environment-variables) to know more.\n\n## API\n\n### youtubedl(url, [flags], [options])\n\nIt execs any `youtube-dl` command, returning back the output.\n\n#### url\n\n*Required*<br>\nType: `string`\n\nThe URL to target.\n\n#### flags\n\nType: `object`\n\nAny flag supported by `youtube-dl`.\n\n#### options\n\nAny option provided here will passed to [execa#options](https://github.com/sindresorhus/execa#options).\n\n### youtubedl.exec(url, [flags], [options])\n\nSimilar to main method but instead of a parsed output, it will return the internal subprocess object\n\n```js\nconst youtubedl = require('youtube-dl-exec')\nconst fs = require('fs')\n\nconst subprocess = youtubedl.exec('https://example.com', { dumpSingleJson: true })\n\nconsole.log(`Running subprocess as ${subprocess.pid}`)\n\nsubprocess.stdout.pipe(fs.createWriteStream('stdout.txt'))\nsubprocess.stderr.pipe(fs.createWriteStream('stderr.txt'))\n\nsetTimeout(subprocess.cancel, 30000)\n```\n\n### youtubedl.create(binaryPath)\n\nIt creates a `youtube-dl` using the `binaryPath` provided.\n\n## Environment variables\n\nThe environment variables are taken into account when you perform a `npm install` in a project that contains `youtube-dl-exec` dependency.\n\nThese environment variables can also be set through \"npm config\", for example `npm install --YOUTUBE_DL_HOST=\"Some URL\"`, or store it in `.npmrc` file.\n\nThey setup the download configuration for getting the `youtube-dl` binary file.\n\nThese variables can be\n\n### YOUTUBE_DL_HOST\n\nIt determines the remote URL for getting the `youtube-dl` binary file.\n\nThe default URL is [ytdl-org/youtube-dl latest release](https://github.com/ytdl-org/youtube-dl/releases/latest).\n\n### YOUTUBE_DL_DIR\n\nIt determines the folder where to put the binary file.\n\nThe default folder is `bin`.\n\n### YOUTUBE_DL_FILENAME\n\nIt determines the binary filename.\n\nThe default binary file could be `youtube-dl` or `youtube-dl.exe`, depending of the [`YOUTUBE_DL_PLATFORM`](#youtube_dl_platform) value.\n\n### YOUTUBE_DL_PLATFORM\n\nIt determines the architecture of the machine that will use the `youtube-dl` binary.\n\nThe default value will computed from `process.platform`, being `'unix'` or `'win32'`.\n\n### YOUTUBE_DL_SKIP_DOWNLOAD\n\nWhen is present, it will skip the [postinstall](/scripts/postinstall.js) script for fetching the latest `youtube-dl` version.\n\nThat variable should be set before performing the installation command, such as:\n\n```bash\nYOUTUBE_DL_SKIP_DOWNLOAD=true npm install\n```\n\n## License\n\n**youtube-dl-exec** © [microlink.io](https://microlink.io), released under the [MIT](https://github.com/microlinkhq/youtube-dl-exec/blob/master/LICENSE.md) License.<br>\nAuthored and maintained by [Kiko Beats](https://kikobeats.com) with help from [contributors](https://github.com/microlinkhq/youtube-dl-exec/contributors).\n\n> [microlink.io](https://microlink.io) · GitHub [microlink.io](https://github.com/microlinkhq) · Twitter [@microlinkhq](https://twitter.com/microlinkhq)\n","readmeFilename":"README.md"}