{"id":50857738,"url":"https://github.com/coolcodehere/steam-monitor","last_synced_at":"2026-06-14T19:31:07.692Z","repository":{"id":362815493,"uuid":"1254594788","full_name":"coolcodehere/steam-monitor","owner":"coolcodehere","description":"it monitors steam","archived":false,"fork":false,"pushed_at":"2026-06-06T03:22:52.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-06T04:20:36.468Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/coolcodehere.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-30T19:09:17.000Z","updated_at":"2026-06-06T03:22:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/coolcodehere/steam-monitor","commit_stats":null,"previous_names":["coolcodehere/steam-monitor"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/coolcodehere/steam-monitor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolcodehere%2Fsteam-monitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolcodehere%2Fsteam-monitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolcodehere%2Fsteam-monitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolcodehere%2Fsteam-monitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coolcodehere","download_url":"https://codeload.github.com/coolcodehere/steam-monitor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolcodehere%2Fsteam-monitor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34335688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"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":[],"created_at":"2026-06-14T19:31:07.008Z","updated_at":"2026-06-14T19:31:07.683Z","avatar_url":"https://github.com/coolcodehere.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PageMonitor\n\nFetch a web page, compare the **`\u003cbody\u003e`** inner HTML to a local snapshot, and update the snapshot when the body changes. Head, scripts, and other markup outside `\u003cbody\u003e` are ignored. Volatile bits (hidden config blocks, large `data-*` blobs, session hashes, timestamps) are stripped before compare so routine session noise does not trigger updates.\n\n## Usage\n\n### Python API\n\n```python\nfrom pagemonitor import check_for_changes\n\nif check_for_changes(\"https://example.com\", \"snapshots/example.html\"):\n    print(\"Page changed!\")\n```\n\nBehavior:\n\n- **No snapshot yet** — saves the body inner HTML and returns `False`.\n- **Snapshot matches** — returns `False` (snapshot is left as-is).\n- **Snapshot differs** — prints only the changed fragments to stdout, overwrites the snapshot, and returns `True`.\n\n### Discord notifications\n\nAfter each check, PageMonitor posts the result to a Discord channel using the [bot API](https://discord.com/developers/docs/resources/channel#create-message)—changed, unchanged, or first-time baseline. The outgoing request is printed to the console (token redacted).\n\nFor [Steam Frame](https://store.steampowered.com/hardware/steamframe), any detected **change** pings the **@Steam Frame Interest** role (Discord requires `allowed_mentions` in the API payload for the ping to fire). Set `DISCORD_NOTIFY_ROLE_ID` to that role's ID; the bot needs permission to mention the role in that channel.\n\nTest the ping:\n\n```bash\npython3 scripts/ping_role.py\n```\n\nSimulate a Steam Frame change (reserve/buy detected, role ping, no fetch):\n\n```bash\npython3 scripts/simulate_change.py\n```\n\nCopy `.env.example` to `.env` in the project root (or run from a directory that has its own `.env`):\n\n```bash\ncp .env.example .env\n# edit .env with your bot token and channel id\n```\n\n| Variable | Description |\n|----------|-------------|\n| `DISCORD_BOT_TOKEN` | Bot token from the [Discord Developer Portal](https://discord.com/developers/applications) |\n| `DISCORD_CHANNEL_ID` | Channel ID to post in (bot needs **Send Messages** in that channel) |\n| `DISCORD_NOTIFY_USER_ID` | Your Discord **user** ID — @mentioned in that channel when the page changes |\n| `DISCORD_NOTIFY_ROLE_ID` | **@Steam Frame Interest** role ID — @mentioned on Steam Frame page changes |\n\n```bash\npython3 scripts/check_page.py https://example.com snapshots/example.html\n```\n\nValues in `.env` are loaded automatically. Variables already set in your shell take precedence. If Discord variables are missing, monitoring still works; notifications are skipped. Pass `notify=False` to `check_for_changes()` to disable Discord posts.\n\n### CLI\n\n```bash\npython scripts/check_page.py https://example.com snapshots/example.html\n```\n\nOr after install:\n\n```bash\npip install -e .\ncheck-page https://example.com snapshots/example.html\n```\n\n### Docker (Steam Frame every 30 seconds)\n\nAll Docker files live in [`docker/`](docker/). See [`docker/README.md`](docker/README.md).\n\nEquivalent to running this on a loop:\n\n```bash\npython3 scripts/check_page.py https://store.steampowered.com/hardware/steamframe snapshots/steamframe.html\n```\n\n```bash\ncp .env.example .env   # Discord token + channel id\n./docker/docker-up.sh\n```\n\n- Loads secrets from `.env` in the project root\n- Persists `snapshots/steamframe.html` on the host\n- Checks every **30 seconds** (`PAGEMONITOR_INTERVAL` to override)\n\nStop: `docker compose -f docker/docker-compose.yml down`\n\n### Tests\n\n```bash\npython3 -m unittest discover -s tests -v\n```\n\nThe suite mocks page fetches and injects HTML changes between runs to verify detection works and session noise is ignored.\n\nNote: This is slopcoded so I cannot guarantee performance.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolcodehere%2Fsteam-monitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoolcodehere%2Fsteam-monitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolcodehere%2Fsteam-monitor/lists"}