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 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-domsnapshot

v0.1.1

Published

DOM Snapshot node for n8n using Playwright

Readme

Banner image

🕸️ DOM Snapshot Node

DOM Snapshot to niestandardowy węzeł dla n8n, który umożliwia pobranie pełnego kodu HTML strony internetowej za pomocą biblioteki Playwright.
Node otwiera podany adres URL w przeglądarce Chromium w trybie headless, czeka na wskazany moment załadowania strony, a następnie zwraca zrzut DOM w formacie HTML.


✨ Funkcjonalności

  • Otwiera stronę w Playwright Chromium.
  • Czeka na wybrane zdarzenie załadowania strony:
    • Load – pełne załadowanie strony.
    • DOM Content Loaded – załadowanie drzewa DOM.
    • Network Idle – brak aktywnych połączeń sieciowych.
  • Zwraca zawartość strony (<html>...</html>) w polu data w JSON.
  • Obsługuje parametr timeout (maksymalny czas oczekiwania).
  • Może działać jako node typu transform lub jako narzędzie (usable as tool).

⚙️ Parametry

| Nazwa | Typ | Domyślna wartość | Opis | |---------------------|-----------|------------------|----------------------------------------------------------------------| | URL | string | – | Adres strony, którą chcesz pobrać. Wymagane. | | Wait Until | options | networkidle | Moment, w którym uznać stronę za załadowaną (load, domcontentloaded, networkidle). | | Timeout (ms) | number | 30000 | Maksymalny czas (w milisekundach) oczekiwania na załadowanie strony. |


📦 Instalacja

🔹 Przez interfejs GUI n8n

  1. Wejdź w ustawienia Community Nodes w n8n.
  2. Kliknij Install i podaj nazwę repozytorium: n8n-nodes-domsnapshot
  3. n8n automatycznie pobierze i zainstaluje paczkę wraz z wymaganymi zależnościami.
  4. Po restarcie n8n node DOM Snapshot będzie dostępny w edytorze workflow.

Manualna

  1. Sklonuj repozytorium lub skopiuj kod node’a do swojego katalogu community nodes w n8n.

    git clone https://github.com/poewer/n8n-nodes-domsnapshot
  2. W katalogu node’a uruchom:

    npm install
  3. playwright zostanie zainstalowany automatycznie,

  4. a dzięki postinstall zostanie również pobrane Chromium (npx playwright install chromium).

  5. Zbuduj node:

    npm run build
  6. Uruchom n8n z włączoną obsługą community nodes i dodaj DOM Snapshot do swojego workflow.

🚀 Przykład użycia

  1. Dodaj node DOM Snapshot w workflow.

  2. Podaj adres URL, np. https://example.com.

  3. Ustaw tryb oczekiwania, np. Network Idle.

  4. Uruchom workflow.

Przykładowy output w polu json.data:

{
  "data": "<!DOCTYPE html><html><head>...</head><body>...</body></html>"
}

🛠️ Obsługa błędów

  • Brak wartości w polu URL powoduje błąd.

  • Jeśli strona nie załaduje się w zadanym czasie, zwrócony zostanie błąd.

  • Jeśli w n8n włączona jest opcja Continue On Fail, błąd zostanie przypisany do danego elementu (itemIndex), a workflow będzie kontynuowany.

Licencja

MIT