{"id":20196263,"url":"https://github.com/hangrybear666/playwright-pr0game","last_synced_at":"2026-02-11T23:18:48.540Z","repository":{"id":253687682,"uuid":"790922202","full_name":"hangrybear666/playwright-pr0game","owner":"hangrybear666","description":"Playwright Browser Automation written in TypeScript to enable autonomous gameplay of the browser game pr0game, Also collects player stats and export them via Telegram Chat Bot.","archived":false,"fork":false,"pushed_at":"2024-09-06T20:10:12.000Z","size":689,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T14:39:14.266Z","etag":null,"topics":["bot","browser-automation","playwright","telegram-chatbot","typescript","webscraping"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hangrybear666.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-23T19:13:09.000Z","updated_at":"2024-11-20T00:38:45.000Z","dependencies_parsed_at":"2024-11-14T07:15:14.670Z","dependency_job_id":null,"html_url":"https://github.com/hangrybear666/playwright-pr0game","commit_stats":null,"previous_names":["hangrybear666/playwright-pr0game"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hangrybear666/playwright-pr0game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hangrybear666%2Fplaywright-pr0game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hangrybear666%2Fplaywright-pr0game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hangrybear666%2Fplaywright-pr0game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hangrybear666%2Fplaywright-pr0game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hangrybear666","download_url":"https://codeload.github.com/hangrybear666/playwright-pr0game/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hangrybear666%2Fplaywright-pr0game/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273010967,"owners_count":25030369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","browser-automation","playwright","telegram-chatbot","typescript","webscraping"],"created_at":"2024-11-14T04:22:57.725Z","updated_at":"2026-02-11T23:18:43.519Z","avatar_url":"https://github.com/hangrybear666.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Express/Playwright Browser Automation Bot\n\n## Overview\n\nThis project is an Express server written in TypeScript that utilizes Playwright for browser automation. It enables continuous and autonomous gameplay of the browser game pr0game. It is able to construct buildings, queue researches, build ships and defense.\nIt can collect player stats in regular intervals and export them as .json files.\nUser Notifications of executed tasks is handled via Telegram Chatbot.\n\n## Table of Contents\n\n- [Technologies](#technologies)\n- [Setup](#setup)\n- [Usage](#usage)\n- [License](#license)\n\n## Technologies\n\n- **TypeScript:** A statically typed superset of JavaScript.\n- **Playwright:** Browser automation library for automating browser tasks.\n- **Express:** A minimalist web framework for Node.js.\n- **Node.js:** JavaScript runtime environment.\n- **Morgan:** HTTP request logger middleware for Node.js.\n- **node-telegram-bot-api:** Telegram Bot API wrapper.\n- **winston:** Logging library for Node.js.\n- **Axios:** A promise-based HTTP client for exporting generated .json files via HTTP POST requests to an external server.\n- **Nodemon:** Hot Reload upon file changes of the server during development, enhancing the development workflow.\n- **ts-node:** Executing TypeScript files directly without the need for compilation, enhancing the development workflow.\n- **ESLint and Prettier:** Linter and Formatter for ensuring code quality and enforcing coding standards.\n\n## Setup\n\n**Dependencies**\n\n1. **Node.js:** Ensure Node.js is installed with a version compatible with the listed dependencies.\n\n**Installation**\n\n1. **Clone the Repository:**\n\n```\ngit clone https://github.com/your-username/express-pr0game-automation.git\n```\n\n2. **Navigate to the Project Folder:**\n\n```\ncd playwright-pr0game\n```\n\n3. **Install Dependencies:**\n\n```\nnpm install\n```\n\n4. **Configure Environment Variables:**\n\n   - Create a `.env` file in the root directory.\n   - Define the following variables:\n   #### CONNECTION DETAILS\n     - PROGAME_BASE_URL=https://pr0game.com/\n     - PROGAME_UNI_RELATIVE_PATH=/uni4/game.php\n     - PROGAME_DASHBOARD_URL=https://pr0game.com/uni4/game.php\n     - PROGAME_BUILDING_PAGE_URL=https://pr0game.com/uni4/game.php?page=buildings\n   #### TELEGRAM BOT\n     - TELEGRAM_BOT_TOKEN=\n     - TELEGRAM_BOT_USERNAME=\n     - TELEGRAM_USER_CHAT_ID=\n   #### REST API\n     - REST_PW=\n     - STAT_EXPORT_SERVER_URL=\n   #### USER CREDS\n     - PROGAME_USERNAME_DEFAULT=\n     - PROGAME_EMAIL_DEFAULT=\n     - PROGAME_PW_DEFAULT=\n\n     #### Optional\n     - PROGAME_USERNAME_1=\n     - PROGAME_EMAIL_1=\n     - PROGAME_PW_1=\n     - PROGAME_USERNAME_2=\n     - PROGAME_EMAIL_2=\n     - PROGAME_PW_2=\n\n\n\n## Usage with Playwright Test for VSCode\n\n1. **Install the Extension**\n\n2. **Follow the Extension Instructions**\n\n3. **Start Test in VSCode GUI**\n\n\n## Usage in CLI\n```\nnpx playwright test tests/queue.spec.ts\nnpx playwright test tests/stats.spec.ts\nnpx playwright test --ui\n```\n\n## Usage with npm run\n\nAdd to package.json\n```\n  \"scripts\": {\n    \"server\": \"nodemon --ignore ./storage/ app.ts\",\n    \"dev\": \"cross-env CLI_PROGAME_USERNAME=placeholder CLI_PROGAME_EMAIL=example@gmail.com CLI_PROGAME_PW=asdaspw npx playwright test\"\n  },\n```\n\n## Usage with REST API\n\n1. **Run the Server:**\n\n```\nnpm run server\n```\n\n2. **Start the queue:**\n\nSend a http GET request to\nhttp://localhost:3000/playwright/queue/:pw/:user_id?\n\nif user_id is omitted, default credentials are used.\n3. **Extract stats:**\n\nSend a http GET request to\nhttp://localhost:3000/playwright/stats/:pw/:user_id?\n\n3. **Interact with the Telegram Bot:**\n\n   - Add the telegram bot from the .env variable TELEGRAM_BOT_USERNAME\n   - Text /start to your messenger to receive updates and log messages.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhangrybear666%2Fplaywright-pr0game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhangrybear666%2Fplaywright-pr0game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhangrybear666%2Fplaywright-pr0game/lists"}