New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

iyoutube

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iyoutube - npm Package Compare versions

Comparing version 0.0.32 to 0.0.33

4

output/interfaces/Video.js

@@ -200,7 +200,7 @@ "use strict";

const html = playPage.data;
const varFind = html.indexOf("var ytInitialPlayerResponse =");
const varFind = html.indexOf("var ytInitialPlayerResponse = {");
const scriptStart = helpers_1.default.getIndexAfter(">", helpers_1.default.getIndexBefore("<script", varFind, html), html) + 1;
const scriptEnd = helpers_1.default.getIndexAfter("</script>", varFind, html);
const scriptBetween = html.substring(scriptStart, scriptEnd);
const script = scriptBetween.substring(0, scriptBetween.lastIndexOf("};var") + 2);
const script = scriptBetween.substring(0, scriptBetween.lastIndexOf("};") + 2);
const scriptFunc = new Function(script + " return ytInitialPlayerResponse;");

@@ -207,0 +207,0 @@ const playerJSON = scriptFunc();

{
"name": "iyoutube",
"version": "0.0.32",
"version": "0.0.33",
"description": "The ultimate unofficial YouTube API Client for Javascript",

@@ -5,0 +5,0 @@ "main": "output/main.js",

@@ -259,7 +259,7 @@ import { DEFAULT_CLIENT_VERSION, DEFAULT_USER_AGENT, ENDPOINT_COMMENT_CREATE, ENDPOINT_DISLIKE, ENDPOINT_LIKE, ENDPOINT_NEXT, ENDPOINT_PLAYER, ENDPOINT_RATING, ENDPOINT_REMOVELIKE, ENDPOINT_WATCHPAGE } from "../constants";

const varFind = html.indexOf("var ytInitialPlayerResponse ="); //Locate the Var Definition
const varFind = html.indexOf("var ytInitialPlayerResponse = {"); //Locate the Var Definition
const scriptStart = helpers.getIndexAfter(">", helpers.getIndexBefore("<script", varFind, html), html) + 1; //Get Script Tag Before
const scriptEnd = helpers.getIndexAfter("</script>", varFind, html); //Get Script Tag After
const scriptBetween = html.substring(scriptStart, scriptEnd); //Get Script (between both Tags)
const script = scriptBetween.substring(0, scriptBetween.lastIndexOf("};var") + 2);
const script = scriptBetween.substring(0, scriptBetween.lastIndexOf("};") + 2);

@@ -266,0 +266,0 @@ const scriptFunc = new Function(script + " return ytInitialPlayerResponse;"); //Parse the Functions Inside

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