This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The script requires Node.js to run. Install Node.js here https://nodejs.org/en/download/prebuilt-installer | |
// It also requires a XML sitemap to exist at https://example.com/sitemap.xml | |
// To start the script, open the file in your fav IDE, open the terminal and use: node screenshot.js {your url (e.g., https://example.com)} | |
// Don't forget to insert your API key below | |
// If you get an error saying "Error: Cannot find module", make sure you open the script in a workspace | |
// In VS Code, go to "File" > "Open Folder" | https://code.visualstudio.com/docs/editor/workspaces | |
// API key from https://apiflash.com/ (replace with your actual key) | |
const API_KEY = "your_apiflash_api_key_here"; |