This project connects Playwright to an existing Google Chrome Profile 1 session through the Chrome DevTools Protocol. It opens ChatGPT, Gemini, and Claude tabs, sends AI/ML/programming prompts, monitors the EarnPT verified-view counter, and rotates through configured EarnPT accounts.
- Windows 10 or later
- Node.js 18 or later
- Google Chrome installed at the default path
- A Chrome profile named
Profile 1 - The required websites already authenticated in that Chrome profile
- Permission to use the configured accounts and services
From PowerShell:
cd F:\Automation
npm installThe project uses Playwright from package.json; no global Playwright installation is required.
Create the local environment file from the template:
Copy-Item .env.copy .envSet CHROME_USER_HOME in .env to the Windows user home, such as C:/Users/your-windows-username. Set DAILY_VERIFIED_VIEWS_CAP=750 to control the per-account daily limit. The launcher derives the Chrome user-data directory from CHROME_USER_HOME. Profile 1 is created automatically by Chrome on the first launcher run; sign in to the required services in that profile before starting the automation.
Create the local account file from the template:
Copy-Item accounts.json.copy accounts.jsonEdit accounts.json and put the authorized account emails in the accounts array. accounts.json is ignored by Git. Do not add passwords, bearer tokens, cookies, or other credentials to this file.
The checked-in accounts.json.copy is only a configuration template. Keep the real local account file uncommitted.
Run:
.\start-real-chrome-profile1-debug.ps1The launcher closes existing Chrome processes and starts Chrome with:
- Profile
Profile 1 - Remote debugging on
127.0.0.1:9222 - The real Chrome user-data directory
Save any important Chrome work before running the launcher.
node playwright-automation.jsThe script validates accounts.json, connects to Chrome, logs into the next eligible account, and captures browser-session cookies in memory. It does not write authentication cookies or bearer tokens to the account file or prompt log.
- The per-account daily verified-view cap is configured in
DAILY_VERIFIED_VIEWS_CAP. - The default cap is 750 verified views per account per local calendar day and can be changed with
DAILY_VERIFIED_VIEWS_CAPin.env. - A new account cycle is started only when the next 95-view cycle fits within the remaining daily quota.
- Accounts at or beyond the cap are skipped until the next day.
- A one-hour cooldown is enforced between logins for the same account.
- If no account is eligible, the ChatGPT, Gemini, and Claude tabs are closed and the process waits.
- Account selection rotates from the last successful account and skips capped or cooling-down accounts.
These files are intentionally ignored by Git:
earnpt_account_state.json— last successful account and login timestampsdaily_verified_views.json— per-account daily verified-view baselines, changes, and cumulative totalsearnings_millicents.json— latest earnings value per accountverified_views_history.log— verified-view and earnings fetch historyprompt_history.log— submitted prompt audit log
They are created or updated while the program runs. Delete a runtime ledger only when you intentionally want to reset its local state.
Confirm that Chrome was started with the launcher and that port 9222 is available:
Test-NetConnection 127.0.0.1 -Port 9222Make sure the configured Google accounts are already available in the Chrome account chooser and that the selected account can access EarnPT. The script verifies the resulting EarnPT session identity after login.
Public search is optional. If the search proxy times out, the script logs a throttled warning and uses built-in AI/ML/programming topics.
Stop the Node process before changing runtime files. To reset account rotation and quota state, remove earnpt_account_state.json and daily_verified_views.json, then start the program again.
Before running:
node --check playwright-automation.jsThis checks JavaScript syntax without launching Chrome or sending requests.