async-g-i-s
Advanced tools
Comparing version 1.5.2 to 1.5.3
@@ -20,5 +20,5 @@ const fetch = global.fetch || require("node-fetch"); | ||
query = {}, | ||
userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" | ||
userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" | ||
} = options, | ||
body = await fetch(`http://www.google.com/search?${new URLSearchParams({ ...query, tbm: "isch", q: searchTerm })}`, { headers: { "User-Agent": userAgent } }).then(res => res.text()), | ||
body = await fetch(`http://www.google.com/search?${new URLSearchParams({ ...query, udm: "2", tbm: "isch", q: searchTerm })}`, { headers: { "User-Agent": userAgent } }).then(res => res.text()), | ||
content = body.slice(body.lastIndexOf("ds:1"), body.lastIndexOf("sideChannel")), | ||
@@ -25,0 +25,0 @@ results = []; |
{ | ||
"name": "async-g-i-s", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"description": "Async Google Image Search", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,2 +7,3 @@ const gis = require('.'); | ||
const results = await gis("akif9748"); | ||
console.log(results); | ||
assert(results.length > 0); | ||
@@ -9,0 +10,0 @@ assert(results[0].url.length > 0); |
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
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
6670
61