Automated login and data extraction for playground.enoent.org/taskmaitre using Puppeteer.
- Automated login with access code
- Retrieves all projects without a next task
- Takes screenshots at each step for debugging
- Saves results to JSON file
- Supports headless and visible browser modes
- Node.js (v14 or higher)
- Chrome or Chromium browser installed
- Install dependencies:
npm install- Set up your Chrome path (optional - if Chrome is not in the default location):
cp .env.example .env
# Edit .env and set your CHROME_PATHnode puppeteer-login.jsHEADLESS=false node puppeteer-login.jsCHROME_PATH=/path/to/chrome node puppeteer-login.jsYou can modify the configuration directly in puppeteer-login.js:
const CONFIG = {
siteUrl: 'https://playground.enoent.org/taskmaitre',
accessCode: 'taskmaster2025',
chromePath: process.env.CHROME_PATH || '/usr/bin/google-chrome',
headless: process.env.HEADLESS !== 'false',
timeout: 30000
};The script generates the following files:
initial-page.png- Screenshot of the page before loginafter-login.png- Screenshot after entering access codeerror.png- Screenshot if an error occursaccess-denied.png- Screenshot if access is deniedprojects-without-next-task.json- JSON file with extracted projects
If Puppeteer doesn't work in your environment, there's also an HTTP client-based approach:
node login.jsThis uses axios + cheerio to make HTTP requests instead of launching a browser. However, it may not work if the site requires JavaScript execution or has complex authentication.
If you're getting 403 errors:
- The site might be IP-restricted
- Try running from a different network
- Check if the access code has changed
- Verify the site URL is correct
Set the CHROME_PATH environment variable to point to your Chrome installation:
macOS:
export CHROME_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"Linux:
export CHROME_PATH="/usr/bin/google-chrome"
# or
export CHROME_PATH="/usr/bin/chromium-browser"Windows (PowerShell):
$env:CHROME_PATH="C:\Program Files\Google\Chrome\Application\chrome.exe"The script tries multiple selectors to find projects. If it doesn't find any:
- Run with
HEADLESS=falseto see what the page looks like - Check the screenshots in the output directory
- Look at the "Page structure" output in the console
- Modify the selectors in the
getProjects()method
To customize for different sites or data extraction:
-
Change the target site: Modify
CONFIG.siteUrlandCONFIG.accessCode -
Adjust login selectors: Update the
accessCodeSelectorsarray in thelogin()method -
Modify project extraction: Update the
projectSelectorsarray and filtering logic ingetProjects() -
Change filtering criteria: Modify the filter in
getProjectsWithoutNextTask()to match your needs
=== Projects WITHOUT Next Task (3) ===
1. Project Alpha - Status: Completed - No upcoming tasks
2. Project Beta - Status: On Hold
3. Project Gamma - Status: Archived
ISC