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

headline-feed

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

headline-feed

Node server that outputs news headlines from configurable sources

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

headline-feed

headline-feed is a node module that outputs news headlines in json from a list of sources.

To start the app, run node index and add an id parameter to the URL e.g. http://localhost:3000/headlines?id=abcau

A source (in sources.js) has this structure -

{
	id: 'abcau',
	name: 'ABC News',
	url: 'http://www.abc.net.au/news/feed/45910/rss.xml',
	query: {
		obj: 'rss.channel.item',
		title: 'title'
	},
	type: 'xml'
}
  • id - An arbitrary string to reference the source in the URL
  • name - The name of the source
  • url - This can be an xml/rss feed or a web page
  • query
    • obj - This is a json-query string that corresponds to the array of objects for news headlines in the xml feed
    • title - The property name inside the object that contains the headline title
  • type - xml or scraped. If xml is specified the source URl is going to be parsed as xml and the query object should be in json-query format. If the type is set to scraped, the obj and title properties need to correspond to CSS selectors on the page that can be scraped

To-do

This is a work in progress, the aim is to have a standard way of outputting news headlines from multiple sources. In the future there will be ways to group and output headlines from multiple sources, and to be able to choose what other properties of a headline might also be included in the json - e.g. URL or description.

Keywords

FAQs

Package last updated on 29 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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