[new node]: node-red-contrib-cheerio-function

#1

New node to be added to https://flows.nodered.org:

https://www.npmjs.com/package/node-red-contrib-cheerio-function

0 Likes

What type of web pages can Node Red retrieve data from?
#2

Here is an example for using Cheerio with a Node-RED function. It should be easily adapted to your node since the example simply makes Cheerio available to a function node manually.

0 Likes

#3

And the built in HTML node uses cheerio also.

0 Likes

#4

Thanks for the hint, this option was already known to me, but I wanted to have a palette based only install of a cario node, as it is not always possible to fiddle with settings.js and add globals. In my use case I run somewhere node-red based on a docker container and can't change local files just use web access alone.

0 Likes

#5

As for the HTML node, thx, didn't know that, cool. Still doesn't solve my problem in being as flexible as a function node. Would be really cool to have the option to change globals at runtime or with a deploy. And expose them directly without fiddling around the global.get()... in function node. Or have some sort of Node-Red config that can be edited from Web-UI to achieve something similar.

In the end, does this mean my node is not being accepted?

0 Likes

#6

Should be fine as long as packaged properly. But we have been having problems with npm not automatically indexing them properly recently and both Nick and I are on vacation so can’t kick manually at the moment.
(Just pointing out that very similar functionality already exists so may not be necessary. Always good to propose/discuss on the forum before writing loads of code :slight_smile:

0 Likes

#7

(And better config options are on the todo list)

0 Likes

#8

Enjoy vacation :smiley:

And for better config options being on todo list :+1:

0 Likes

#9

I get the reasons and it makes for a neat solution anyway.

This is easily done. Just put a suitable inject flow on the first tab. Make it fire on load. I do this with a number of key globals. The advantage of the settings file of course is that it can't be changed by an admin user unless they have access to the file system. So it is good to have both options.

It is an open source system so nobody can block you :slight_smile:

0 Likes