Puppeteer automation in Chrome to autoplay video.
Customise for your target content by editing the CSS selectors and other constants in src/constants.ts
-
Install dependencies
npm i
-
(Optional) Setup a specific Chrome user data directory and profile
Set .env variables:
USER_DATA_DIR PROFILE_DIR
-
Login to video site with Chrome user:
- Enter a dummy watch time (for ex. current date time) in
schedule.json
- Run the watcher script via
npm run watch
- Open a new tab and login to watch page
- Enter a dummy watch time (for ex. current date time) in
-
Update watch times in
schedule.json
-
Run watcher
npm run watch