New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-gnews

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-gnews - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

dist/gnews.d.ts

@@ -8,2 +8,4 @@ export interface NewsArticle {

publisher: string;
fullCoverage: string;
thumbnailUrl: string | null;
}

@@ -14,5 +16,5 @@ export declare class Gnews {

constructor(defaultParams?: any);
headlines(topic: string, extraParams?: any): Promise<NewsArticle[]>;
headlines(topic?: string, extraParams?: any): Promise<NewsArticle[]>;
search(q: string, extraParams?: any): Promise<NewsArticle[]>;
private request(url, extraParams?);
}

@@ -32,6 +32,8 @@ "use strict";

const publisher = entities.decode($('font').html() || '');
const fullCoverage = $('ol > a').attr('href');
// Add publisher, re-formatted description, and url
const formattedArticle = Object.assign(article, {
description: decodedDescription,
publisher
publisher,
fullCoverage
});

@@ -38,0 +40,0 @@ // omit imgSrc if empty

{
"name": "node-gnews",
"version": "1.0.0",
"version": "1.0.1",
"description": "A simple node module that loads articles from Google News",
"repository": {
"type": "git",
"url": "https://github.com/shumbo/node-gnews"
},
"main": "dist/index.js",

@@ -10,3 +14,3 @@ "types": "dist/index.d.ts",

"prepublishOnly": "npm run lint && npm test",
"prepare":"npm run build",
"prepare": "npm run build",
"build": "tsc --project ./tsconfig.json",

@@ -13,0 +17,0 @@ "lint": "tslint -c tslint.json 'src/**/*.ts'"

@@ -104,3 +104,4 @@ # node-gnews

|publisher|Publisher of the article|EW.com|
|fullCoverage|Link to the Google News Related Stories|https://news.google.com/story/dOHKnaQodeaDspMmZOqoGu4YGQ47M?hl=en&ned=us (expired)|
|thumbnailUrl|Thumbnail image url. **Omitted when not available.**|https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcSzlMagnYwijdaLtdc4MWJopShsC9vRGDh-_LKP9GlJ_ofu6J8OyUFdlebTu4e1JT6mb0_YY7Lw59M|

@@ -14,2 +14,4 @@ import axios from 'axios';

publisher: string;
fullCoverage: string;
thumbnailUrl: string | null;
}

@@ -46,2 +48,3 @@

const publisher = entities.decode($('font').html() || '');
const fullCoverage = $('ol > a').attr('href');

@@ -51,3 +54,4 @@ // Add publisher, re-formatted description, and url

description: decodedDescription,
publisher
publisher,
fullCoverage
});

@@ -73,3 +77,3 @@

}
public headlines(topic: string, extraParams: any = {}) {
public headlines(topic?: string, extraParams: any = {}) {
let url;

@@ -76,0 +80,0 @@ if (topic) {

@@ -28,3 +28,4 @@ import test from 'ava';

thumbnailUrl:
'https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSStFGoURvbhN2B3uOAMfecR8xA8VPQZeqYVHQU1fet9AuOyvWOAv4qMamS5o94sC7mtt87J6Y6QOw'
'https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSStFGoURvbhN2B3uOAMfecR8xA8VPQZeqYVHQU1fet9AuOyvWOAv4qMamS5o94sC7mtt87J6Y6QOw',
fullCoverage: 'https://news.google.com/story/dlsXxqrSy2rUJaMH0ymTb3ve8h_JM?hl=en&ned=us'
};

@@ -57,3 +58,3 @@

.decode(
'&lt;table border="0" cellpadding="2" cellspacing="3"&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSWE57yJAuPHskDGwgSGKoUp7QfIbwh5ek8UUwUrGeMLLyXxtHjWJLTHjN_9-A5eDf2AvBS6xHsnQ" border="1"&gt;&lt;/td&gt;&lt;td&gt;&lt;ol style="list-style: none; margin: 0; padding: 0;"&gt;&lt;strong&gt;&lt;li&gt;&lt;a href="https://www.forbes.com/sites/kevinmurnane/2017/12/16/the-nintendo-switch-offers-unique-opportunities-for-players-and-developers-alike/" target="_blank"&gt;The Nintendo Switch Offers Unique Opportunities For Players And Developers Alike&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;font color="#6f6f6f"&gt;Forbes&lt;/font&gt;&lt;/li&gt;&lt;/strong&gt;&lt;li&gt;&lt;a href="https://www.pastemagazine.com/articles/2017/12/what-nintendo-can-teach-us-about-exploration-in-op.html" target="_blank"&gt;What Nintendo Can Teach Us About Exploration in Open World Game Design&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;font color="#6f6f6f"&gt;Paste Magazine&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://cogconnected.com/2017/12/yooka-laylee-finally-nintendo-switch/" target="_blank"&gt;Yooka-Laylee Finally Out On Nintendo Switch&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;font color="#6f6f6f"&gt;COGconnected&lt;/font&gt;&lt;/li&gt;&lt;a href="https://news.google.com/story/dFB9tmCh7NpJnbMrO5E2ANrVmC9PM?hl=en&amp;ned=us" target="_blank"&gt;Full coverage&lt;/a&gt;&lt;/ol&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;'
'&lt;table border="0" cellpadding="2" cellspacing="3"&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSWE57yJAuPHskDGwgSGKoUp7QfIbwh5ek8UUwUrGeMLLyXxtHjWJLTHjN_9-A5eDf2AvBS6xHsnQ" border="1"&gt;&lt;/td&gt;&lt;td&gt;&lt;ol style="list-style: none; margin: 0; padding: 0;"&gt;&lt;strong&gt;&lt;li&gt;&lt;a href="https://www.forbes.com/sites/kevinmurnane/2017/12/16/the-nintendo-switch-offers-unique-opportunities-for-players-and-developers-alike/" target="_blank"&gt;The Nintendo Switch Offers Unique Opportunities For Players And Developers Alike&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;font color="#6f6f6f"&gt;Forbes&lt;/font&gt;&lt;/li&gt;&lt;/strong&gt;&lt;li&gt;&lt;a href="https://www.pastemagazine.com/articles/2017/12/what-nintendo-can-teach-us-about-exploration-in-op.html" target="_blank"&gt;What Nintendo Can Teach Us About Exploration in Open World Game Design&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;font color="#6f6f6f"&gt;Paste Magazine&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://cogconnected.com/2017/12/yooka-laylee-finally-nintendo-switch/" target="_blank"&gt;Yooka-Laylee Finally Out On Nintendo Switch&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;font color="#6f6f6f"&gt;COGconnected&lt;/font&gt;&lt;/li&gt;&lt;a href="https://news.google.com/story/dFB9tmCh7NpJnbMrO5E2ANrVmC9PM?hl=en&ned=us" target="_blank"&gt;Full coverage&lt;/a&gt;&lt;/ol&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;'
)

@@ -63,3 +64,4 @@ .replace(/&nbsp;/g, String.fromCharCode(160)), // non-breaking space

thumbnailUrl:
'https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSWE57yJAuPHskDGwgSGKoUp7QfIbwh5ek8UUwUrGeMLLyXxtHjWJLTHjN_9-A5eDf2AvBS6xHsnQ'
'https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSWE57yJAuPHskDGwgSGKoUp7QfIbwh5ek8UUwUrGeMLLyXxtHjWJLTHjN_9-A5eDf2AvBS6xHsnQ',
fullCoverage: 'https://news.google.com/story/dFB9tmCh7NpJnbMrO5E2ANrVmC9PM?hl=en&ned=us'
};

@@ -66,0 +68,0 @@

Sorry, the diff of this file is not supported yet

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