Readme - sample provided is not working or requires specific libs
if i install feedrat and run the code sample i have the following eror:
(node:88884) UnhandledPromiseRejectionWarning: ReferenceError: feed is not defined
at ...index.js:7:18
at ../node_modules/feedrat/feedrat.js:84:14
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:88884) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:88884) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I've changed it like this to make it works:
const feedrat = require('feedrat'),
searchPrefix = 'https://search.modalogi.com/searx/search?format=rss&q=';
feedrat('peppercarrot', searchPrefix, function(err, feed_url) {
if (feed_url) {
console.log(feed_url)
} else {
console.log('No feed found')
}
});
feed
var was undeclared and i removed dependency of another library which is not necessary at this level.