Bananamilk452 / better-ytsr

Better filter experience on ytsr
1 stars 0 forks source link

better-ytsr

better-ytsr is library that upgrade filter feature from node-ytsr (ytsr is original package and dependency)

Install

NPM:

npm install --save better-ytsr

Yarn:

yarn add better-ytsr

Example

const ytsr = require("better-ytsr");

// below line should be inside of async function
const result = await ytsr("search query");

API (Filter options that added in this package)

More functions, detail in original API documentation (node-ytsr)

betterytsr(searchString, [options])

Searches for the given string

Example:

const ytsr = require("better-ytsr");

async function query(q) {
  const result = await ytsr(q, { hl: 'ko', gl: 'KR', pages: 1, filters: { type: 'Video', features: ['4K', 'Subtitles/CC'] } });

  return result;
}

console.log(query('battlefield 2042 trailer'))

function ytsr.getFilters is not included in this package.

License

MIT