Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

youtubei.js

Package Overview
Dependencies
Maintainers
1
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

youtubei.js - npm Package Compare versions

Comparing version 1.4.2-d.6 to 1.4.2-d.7

2

lib/core/SessionBuilder.js

@@ -47,3 +47,3 @@ 'use strict';

const id = Utils.generateRandomString(11);
const timestamp = new Date().getTime();
const timestamp = Math.floor(Date.now() / 1000);

@@ -50,0 +50,0 @@ const visitor_data = Proto.encodeVisitorData(id, timestamp);

@@ -16,3 +16,3 @@ 'use strict';

const buf = messages.VisitorData.encode({ id, timestamp });
return encodeURIComponent(Buffer.from(buf).toString('base64'));
return encodeURIComponent(Buffer.from(buf).toString('base64').replace(/\//g, '_'));
}

@@ -19,0 +19,0 @@

{
"name": "youtubei.js",
"version": "1.4.2-d.6",
"version": "1.4.2-d.7",
"description": "A full-featured library that allows you to get detailed info about any video, subscribe, unsubscribe, like, dislike, comment, search, download videos/music and much more!",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -210,3 +210,2 @@ export = Actions;

* @param {string} args.video_id
* @param {string} args.channel_id
* @param {string} args.ctoken

@@ -219,3 +218,2 @@ * @param {boolean} is_ytm

video_id: string;
channel_id: string;
ctoken: string;

@@ -222,0 +220,0 @@ }): Promise<{

@@ -340,7 +340,9 @@ export = Innertube;

* @param {string} query - search query.
* @param {object} options - search options.
* @param {string} options.client - client used to perform the search, can be: `YTMUSIC` or `YOUTUBE`.
* @param {string} options.order - filter results by order, can be: relevance | rating | age | views
* @param {string} options.period - filter videos uploaded within a period, can be: any | hour | day | week | month | year
* @param {string} options.duration - filter video results by duration, can be: any | short | long
* @param {object} [options] - search options.
* @param {string} [options.client] - client used to perform the search, can be: `YTMUSIC` or `YOUTUBE`.
* @param {object} [options.filters] - search filters.
* @param {string} [options.filters.upload_date] - filter videos by upload date, can be: any | last_hour | today | this_week | this_month | this_year
* @param {string} [options.filters.type] - filter results by type, can be: any | video | channel | playlist | movie
* @param {string} [options.filters.duration] - filter videos by duration, can be: any | short | medium | long
* @param {string} [options.filters.sort_by] - filter video results by order, can be: relevance | rating | upload_date | view_count
*

@@ -350,7 +352,10 @@ * @returns {Promise.<{ query: string; corrected_query: string; estimated_results: number; videos: [] } |

*/
search(query: string, options: {
client: string;
order: string;
period: string;
duration: string;
search(query: string, options?: {
client?: string;
filters?: {
upload_date?: string;
type?: string;
duration?: string;
sort_by?: string;
};
}): Promise<{

@@ -357,0 +362,0 @@ query: string;

@@ -15,6 +15,7 @@ export = Proto;

*
* @param {string} period
* @param {string} duration
* @param {string} order
*
* @param {object} filters
* @param {string} [filters.upload_date] - any | last_hour | today | this_week | this_month | this_year
* @param {string} [filters.type] - any | video | channel | playlist | movie
* @param {string} [filters.duration] - any | short | medium | long
* @param {string} [filters.sort_by] - relevance | rating | upload_date | view_count
* @todo implement remaining filters.

@@ -24,3 +25,8 @@ *

*/
static encodeSearchFilter(period: string, duration: string, order: string): string;
static encodeSearchFilter(filters: {
upload_date?: string;
type?: string;
duration?: string;
sort_by?: string;
}): string;
/**

@@ -27,0 +33,0 @@ * Encodes livechat message parameters.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc