Huge News!Announcing our $40M Series B led by Abstract Ventures.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.0 to 1.0.1

4

package.json

@@ -20,6 +20,6 @@ {

"description": "Simple youtube search library without need of an api key",
"version": "1.0.0",
"version": "1.0.1",
"dependencies": {
"axios": "^0.20.0"
"node-fetch": "^2.6.0"
}
}

@@ -12,7 +12,7 @@ # simpleyt

const simpleYT = require('simpleyt')
simpleYT('JUSTHIS', {
const query = 'JUSTHIS'
simpleYT(query, {
filter: 'video', // Filter only videos
localAddress: '2001:470:1234:5678::a'
// Other parameters are passed to axios
// Other parameters are passed to node-fetch
}).then(console.log)

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

@@ -1,2 +0,2 @@

const axios = require('axios')
const fetch = require('node-fetch')

@@ -7,5 +7,5 @@ module.exports = async (query, options) => {

requestOptions['filter'] = undefined
const response = (await axios.get(
const response = await (await fetch(
'https://www.youtube.com/results?search_query=' + encodeURIComponent(query), requestOptions
)).data
)).text()
const line = response.match(/window\["ytInitialData"]\s*=\s*(.*);+\n/)[0]

@@ -12,0 +12,0 @@ const json = JSON.parse(line.substring(line.indexOf('{'), line.length - 2))

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