This Node.js project provides an SDK/API for fetching and processing news RSS feeds. It simplifies the process of retrieving news articles from various sources in a standardized format.
To install the News RSS SDK/API, you can use npm. Open a terminal and run the following command:
npm install rss-news-to-json-node-sdk
const {createRSSNewsToJSONSDKClient} = require('rss-news-to-json-node-sdk')
const init = async () => {
const newsConfig = () => {
return createRSSNewsToJSONSDKClient('https://news.google.com/rss')
}
const response = await newsConfig()
.news()
.listNews({q: 'bola', hl: 'id', ceid: 'ID'})
console.log('response:', response)
}
init()
data: {
title: '"bola" - Google Berita',
description: 'Google Berita',
webMaster: '[email protected]',
generator: 'NFE/5.0',
link: 'https://news.google.com/search?q=bola&hl=id&ceid=ID:id&gl=ID',
language: 'id',
copyright: '2024 Google Inc.',
lastBuildDate: 'Tue, 02 Jan 2024 04:34:00 GMT',
items: [
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object]
]
}
- [✅] Implement get news by keyword & others query strings
Welcome contributions from the community!