Comparing version 1.0.7 to 1.0.8
@@ -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'] |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
285021
7876
6
4
4
+ Addedminiget@4.2.3(transitive)
- Removedminiget@2.1.0(transitive)
Updatedminiget@^4.2.1