You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Module for MagicMirror², to scrape content from any table on a webpage, choose which rows and columns you want, and how often you want to refresh the display on your mirror.
Installing
Step 1 - Install the module
cd~/MagicMirror/modules
git clone https://github.com/AndyHazz/MMM-Scrapey.git
cd MMM-Scrapey
npm install
Step 2 - Add module to ~MagicMirror/config/config.js
Add this configuration into your config.js file:
{module: "MMM-Scrapey",position: "lower_third",config: {title: "Scrapey module",// Optional - remove or leave empty for no titleurl: "https://webscraper.io/test-sites/tables",// The URL of the page with the table to scrapeupdateInterval: 300,// Refresh time in secondscssSelector: "table",// CSS selector for the table to scrapetableColumns: [1,3,4],// Specify which columns to display (1-based index)tableRows: [1,2,3],// Specify which rows to display (1-based index), leave empty to show allshowTableHeader: true,// Toggle formatting the first row as a table headerplainText: true,// Strip out any extra HTML and just keep the plain text contentwaitForSelector: false,// Set to true if the table loads dynamically via JavaScriptbrowserPath: "/usr/bin/chromium-browser",// Path to Chromium/Chrome for Puppeteer (change if needed)tableWidth: "100%"// Set table width (e.g., "100%", "1200px", etc.)}},
Dynamic Table Support
If the table you want to scrape loads via JavaScript (not present in the initial HTML), set waitForSelector: true in your config.
Note: You must have Puppeteer and a compatible version of Chromium/Chrome installed.
You can specify the path to your browser with browserPath.
On Raspberry Pi, this is usually /usr/bin/chromium-browser or /usr/bin/chromium.