Comparing version 1.0.0 to 1.0.1
@@ -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)) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6032
1
+ Addednode-fetch@^2.6.0
+ Addednode-fetch@2.7.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
- Removedaxios@^0.20.0
- Removedaxios@0.20.0(transitive)
- Removedfollow-redirects@1.15.9(transitive)