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

simpleyt

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simpleyt - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

browser/simpleyt.js

7

package.json

@@ -9,4 +9,5 @@ {

"kimcore <kimcoreovo@gmail.com> (https://github.com/kimcore)",
"shilu (https://github.com/tlfn)"
"shilu (https://github.com/en-you)"
],
"types": "index.d.ts",
"main": "src/index.js",

@@ -20,6 +21,6 @@ "homepage": "https://github.com/kimcore/simpleYT",

"description": "Simple youtube search library without need of an api key",
"version": "1.0.7",
"version": "1.0.8",
"dependencies": {
"miniget": "^2.0.1"
"miniget": "^4.2.1"
}
}

@@ -5,7 +5,6 @@ const miniget = require('miniget')

const response = await miniget(
'https://www.youtube.com/results?search_query=' + encodeURIComponent(query), {...options, ...{filter: undefined}}
`https://www.youtube.com/results?search_query=${encodeURIComponent(query)}`, options
).text()
const match = response.match(/(window\["ytInitialData"]|var ytInitialData)\s*=\s*(.*)};/)
const line = match[0].trim()
const json = JSON.parse(line.substring(line.indexOf('{'), line.length - 1))
const match = response.match(/(window\["ytInitialData"]|var ytInitialData)\s*=\s*(.*)};\s*<\/script>/)
const json = JSON.parse(match[2].trim() + "}")
const result = json

@@ -12,0 +11,0 @@ ['contents']['twoColumnSearchResultsRenderer']['primaryContents']['sectionListRenderer']

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