The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

On my list of tools to try: zhot and tweetzhot (both by Rop Gongrijp and based on puppeteer) to create browser screenshots from the terminal

Posted by jpluimers on 2024/07/17

The feature reminds me on how archive.today saves content.

Both the zhot and tweetzhot repositories are on my list of tools to try. They might make writing blog posts easier.

They are both based on [Wayback/Archive] puppeteer/puppeteer: Headless Chrome Node.js API

Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol. Puppeteer runs headless by default, but can be configured to run full (non-headless) Chrome or Chromium.

It demonstrates headless browser usage and can for instance:

  • Generate screenshots and PDFs of pages.
  • Crawl a SPA (Single-Page Application) and generate pre-rendered content (i.e. “SSR” (Server-Side Rendering)).
  • Automate form submission, UI testing, keyboard input, etc.
  • Create an up-to-date, automated testing environment. Run your tests directly in the latest version of Chrome using the latest JavaScript and browser features.
  • Capture a timeline trace of your site to help diagnose performance issues.
  • Test Chrome Extensions.

Note any headless browser will have some trouble rendering single-page applications.

Repositories:

  1. [Wayback/Archive] ropg/zhot: Web screenshots made super-easy allows to take screenshots from a generic URL like this:

  2. [Wayback/Archive] ropg/tweetzhot: Screenshots of single tweets / replies adds some twitter logic and allows you to take screenshots of tweets like this:

Tweets:

  1. [Archive] ᖇ⦿ᖘ Gonggrijp on Twitter: “I needed web screenshots to be made on my server and couldn’t find what I needed. So I built it myself, learning Node.js in the process.  (Are you a node developer? I’d love to hear what could be better.)… “
  2. [Archive] ᖇ⦿ᖘ Gonggrijp on Twitter: “Need screenshots of single tweets / replies, also unattended / headless? https://t.co/OBNaj10vXn (based on zhot I wrote a few days ago). (Layering the cake towards what I set out to build. I think I’m beginning to like Node.js…) … “

–jeroen


Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.