Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

google-search-parser2

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-search-parser2 - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

4

package.json
{
"name": "google-search-parser2",
"version": "0.0.6",
"version": "0.0.7",
"description": "Parse image and Knowledge Graph data from Google Search results",

@@ -17,3 +17,3 @@ "main": "parser.js",

"scripts": {
"test": "jasmine-node spec",
"test": "jasmine-node spec --captureExceptions",
"lint": "eslint ."

@@ -20,0 +20,0 @@ },

@@ -86,3 +86,6 @@ var htmlparser = require("htmlparser2");

var metaObject = JSON.parse(text);
results.push(metaObject.ou);
results.push({
url: metaObject.ou,
caption: metaObject.pt
});
count++;

@@ -89,0 +92,0 @@ }

@@ -41,4 +41,4 @@ # google-search-parser2

parser.parseImageUrls(searchTerm, function (urls) {
console.log(urls); // [ "https://upload.wikimedia.org/wikipedia/en/f/f4/Supermarioworld.jpg", "http ...
console.log(urls); // [ { url: "https://upload.wikimedia.org/wikipedia/en/f/f4/Supermarioworld.jpg", caption: "foo" }, { url: "http ...
});
```

@@ -83,3 +83,2 @@ /*global describe, it, expect, jasmine */

expect(results.genre).toEqual("Platform game");
expect(results.series).toEqual("Mario Series");
expect(results.developers).toContain("Nintendo");

@@ -100,3 +99,3 @@ expect(results.designers).toContain("Shigeru Miyamoto");

// act
parser.parseImageUrls("Super Mario 64", function (result) {
parser.parseImageUrls("gloom amiga screenshot", function (result) {

@@ -120,4 +119,5 @@ // assert

expect(singleResult).toEqual(jasmine.any(String));
expect(singleResult).toContain("http");
expect(singleResult.url).toEqual(jasmine.any(String));
expect(singleResult.url).toContain("http");
expect(singleResult.caption).toEqual(jasmine.any(String));
}

@@ -124,0 +124,0 @@ done();

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