npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-web-content-analyzer

v1.0.2

Published

Node-RED nodes for web content analysis

Downloads

37

Readme

Web Content Analyzer

This is a node red contribution package that focuses on crawling websites and analyzing their content (text & images). The package is still in it's early stages but expect it to grow in the future.

Dir structure

├── nodes
│   ├── <node_name>.html
│   ├── <node_name>.js
│   └── ...
├── img
│   └── examples
├── install.sh (used for development only)
└── README.md

Nodes explained individually

There are currently 3 nodes in the package:

  • image-analyzer - for a given webpage url (single page) and a set of keywords, the node will analyze the content of the images (titles, meta tags etc.) and return the corresponding images that matches the criteria.
  • text-analyzer - for a given webpage url (single page) and a set of keywords, the node will analyze the content of the text (tags such as p, h1...) and return the corresponding text that matches the criteria.
  • page-finder - for a given webpage url, page finder will crawl the given website and return all the links to the pages, without going offbounds of the given domain. As a result it spits out found links one by one, example being:
every 0.5 seconds the node sends downstream messages:
example.com ->
example.com/about ->
example.com/about/team ->
example.com/contact ->
example.com/contact/office ->
example.com/contact/office/berlin ->

Bugs

Filtering out logs in text-analyzer and image-analyzer doesn't work yet. Expected to be fixed in the next minor patch.

WIPs & Proposals

  • [ ] Web crawling is currently done relatively simple, without any kind of optimization. Should get improved.
  • [ ] Web crawling currently isn't elaborate, thus i propose to add advanced ways of querying a website (example being criteria such as crawling depth etc.)
  • [ ] Analyze the ways these nodes could / should be used and introduce new nodes that would be useful in the context of this package.
  • [ ] Introduce ELK stack sanitizers and transformers for the logs -> goal being easier to play around with data
  • [ ] Enhance logging
  • [ ] Improve dir structure and automate chores etc.
  • [ ] Improve docs & provide examples
  • [ ] Add better icons to the nodes, current ones are confusing
  • [ ] Decouple the logic from nodes itself, contain the logic in ts/js modules and use them within the nodes. This would allow the better containment & scalability of the project.
  • [ ] CI/CD & tests, tests, tests... - luka gotta devops!

Usecase & Closing words

As far as my views go, i do see some potential in this package. Creating any kind of nodeRED contribution opens up quite a lot of doors considering the nature of nodeRED and the amount of integrations it already has. Besides that, this package helps people analyze content on web pages automatically. The value of the package is in it's simplicity and ability to integrate easily into any logic without a lot of setup & need for deeper understanding.

As of the time of writing, only existing nodes are image-analyzer, text-analyzer and page-finder. There are a few ideas that might be interesting to implement, content analysis wise. At the current state, i would still call it POC, but it's a good start regardless.