How to use the rss-parser.parseURL function in rss-parser

To help you get started, we’ve selected a few rss-parser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alirawashdeh / rss-reader-alexa / index.js View on Github external
case "entertainment":
        url = "http://feeds.bbci.co.uk/news/entertainment_and_arts/rss.xml?edition=uk";
        break;

        default:
        response.tellWithCard("Unable to understand " + intent.slots.FeedName.value, "RSS Headlines", "Couldn't understand " + intent.slots.FeedName.value);
        return;
      }
    }
    else
    {
      response.tellWithCard("Unable to understand that request", "RSS Headlines", "Couldn't understand the request");
      return;
    }

    parser.parseURL(url, function(err,parsed){

      var output = "" + parsed.feed.title + ". <break time=\"0.8s\"/> ";

      var i = 0;
      parsed.feed.entries.forEach(function(entry){
        if(i <= 4)
        {
          console.log(entry.title);
          output = output + entry.title + ". <break time=\"0.6s\"/> "
          i++;
        }
      })

      var ssmlOutput = {
        speech: '<speak>' + output + '</speak>',
        type: AlexaSkill.speechOutputType.SSML
github PublicI / fec-loader / src / util / fec / rss.js View on Github external
function queueFilingsToCheck() {
    console.log('checking RSS');


    parser.parseURL('http://efilingapps.fec.gov/rss/generate?preDefinedFilingType=ALL', function(err, parsed) {
        if (!err && parsed && parsed.feed && parsed.feed.entries) {
            var newFilings = parsed.feed.entries.map(function (filing) {
                return parseInt(filing.link.replace('http://docquery.fec.gov/dcdev/posted/','').replace('.fec',''));
            });

            models.fec_filing.findAll({
                    attributes: ['filing_id'],
                    where: {
                        filing_id: {
                            gte: _.min(newFilings)
                        }
                    }
                })
                .then(function(filings) {
                    filings = filings.map(function(filing) {
                        return filing.filing_id;
github DataFire / DataFire / src / commands / integrate.js View on Github external
return acb => {
      if (op.parameters.length) return acb();
      rssParser.parseURL(spec.schemes[0] + '://' + spec.host + path, (err, feed) => {
        if (err) return acb(err);
        feed = feed.feed;
        spec.paths[path].get.summary = feed.title;
        spec.paths[path].get.description = feed.description;
        acb();
      })
    }
  }), err => {
github jondubin / gatsby-source-rss / gatsby-node.js View on Github external
return new Promise((resolve, reject) => {
    parser.parseURL(url, (err, data) => {
      if (err) {
        reject(err);
      }
      resolve(data.feed);
    });
  });
}
github isdampe / music-for-programming / lib / mfp-api.js View on Github external
fetchTracks(callback) {

		rssParser.parseURL(this.rssFeedUri,(err,parsed) => {
			if ( err ) {
				callback(true,[]);
				return false;
			}

			callback(false,parsed.feed.entries);

		});

	}
github DataFire / DataFire / distribution / commands / integrate.js View on Github external
host: urlObj.hostname,
    basePath: '/',
    schemes: [urlObj.protocol.substring(0, urlObj.protocol.length - 1)],
    paths: {},
    definitions: { Feed: RSS_SCHEMA }
  };
  spec.paths[urlObj.pathname] = {
    get: {
      operationId: 'getItems',
      description: "Retrieve the RSS feed",
      responses: {
        '200': { description: "OK", schema: { $ref: '#/definitions/Feed' } }
      }
    }
  };
  rssParser.parseURL(url, function (err, feed) {
    if (err) return callback(err);
    feed = feed.feed;
    spec.info = {
      title: feed.title,
      description: feed.description
    };
    addIntegration(name, 'rss', spec, callback);
  });
};
github SIGSEV / Bridge / api / services / rss.js View on Github external
new Promise((resolve, reject) => {
    parseURL(feedUrl, (err, body) => {
      if (err) {
        return reject(err)
      }

      const { feed } = body

      const entries = feed.entries.map(entry => {
        return {
          ...entry,
          comments: entry.comments,
          pubDate: moment(new Date(entry.isoDate)).format('HH:mm DD/MM/YYYY'),
        }
      })

      resolve({ ...feed, entries })
    })
github smartholdem / smartholdem-wallet / client / app / src / services / feed.service.js View on Github external
return new Promise((resolve, reject) => {
          rssParser.parseURL(url, (err, parsed) => {
            err ? reject(err) : resolve(parsed)
          })
        })
      },
github jondubin / gatsby-source-rss / src / gatsby-node.js View on Github external
return new Promise((resolve) => {
    parser.parseURL(url, resolve);
  });
}
github ArkEcosystem / desktop-wallet / client / app / src / services / feed.service.js View on Github external
return new Promise((resolve, reject) => {
          rssParser.parseURL(url, (err, parsed) => {
            err ? reject(err) : resolve(parsed)
          })
        })
      },

rss-parser

A lightweight RSS parser, for Node and the browser

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis