indo-news-scraper
Advanced tools
Comparing version 1.0.1 to 1.1.1
@@ -7,2 +7,3 @@ 'use strict'; | ||
const Republika = require('./websites/Republika.js'); | ||
const Liputan6 = require('./websites/Liputan6.js'); | ||
@@ -13,3 +14,4 @@ module.exports = { | ||
Kompas: Kompas, | ||
Republika: Republika | ||
Republika: Republika, | ||
Liputan6: Liputan6 | ||
} |
@@ -53,3 +53,3 @@ 'use_strict'; | ||
var d = moment(dateString); | ||
var d = moment(dateString, 'DD MMMM YYYY HH:mm'); | ||
return d.toISOString(); | ||
@@ -56,0 +56,0 @@ } |
@@ -32,9 +32,11 @@ 'use_strict'; | ||
$('.gsc-webResult').each((e, el) => { | ||
// $(el).find('header').find('.simple-share').children().next().children().remove('i'); | ||
newsData.push({ | ||
title: $(el).find('a.gs-title').html().replace(/(<([^>]+)>)/ig, ''), | ||
url: $(el).find('a.gs-title').data('ctorig'), | ||
img: $(el).find('img.gs-image').attr('src'), | ||
date: null | ||
}); | ||
var rawTitle = $(el).find('a.gs-title').html(); | ||
if(rawTitle){ | ||
newsData.push({ | ||
title: rawTitle === null ? null : rawTitle.replace(/(<([^>]+)>)/ig, ''), | ||
url: $(el).find('a.gs-title').data('ctorig'), | ||
img: $(el).find('img.gs-image').attr('src'), | ||
date: null | ||
}); | ||
} | ||
}); | ||
@@ -41,0 +43,0 @@ |
@@ -50,3 +50,3 @@ 'use_strict'; | ||
var d = moment(dateString); | ||
var d = moment(dateString, 'DD MMMM YYYY HH:mm'); | ||
return d.toISOString(); | ||
@@ -53,0 +53,0 @@ } |
{ | ||
"name": "indo-news-scraper", | ||
"version": "1.0.1", | ||
"description": "Indonesia online news scrapper made using NodeJS", | ||
"version": "1.1.1", | ||
"description": "Indonesia online news scrapper made for NodeJS", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
11738
9
250
1
37