Skip to content

Commit 4b73529

Browse files
omalleyandydependabot[bot]OrKoN
committed
chore(deps-dev): update puppeteer to version 24.37.2
Bumps the puppeteer dependency from version 24.36.1 to 24.37.2, incorporating various fixes and improvements, including enhanced ConsoleMessage text results and documentation updates for Page waitFor methods. Co-authored-by: dependabot[bot] <support@github.com> Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
1 parent 63615f9 commit 4b73529

12 files changed

Lines changed: 328 additions & 623 deletions

.claude-plugin/marketplace.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

.claude-plugin/plugin.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

.dockerignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
node_modules
2+
npm-debug.log
3+
Dockerfile*
4+
.dockerignore
5+
.git
6+
.gitignore
7+
.github
8+
.agent
9+
.claude-plugin
10+
.venv
11+
12+
build/node_modules
13+
tests
14+
docs
15+
coverage
16+

Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM node:20-bookworm-slim
2+
3+
# Use a non-root user for security
4+
RUN useradd --create-home --shell /bin/bash appuser
5+
6+
WORKDIR /usr/src/app
7+
8+
# Install dependencies based on lockfile first (better layer caching)
9+
COPY package.json package-lock.json ./
10+
RUN npm ci
11+
12+
# Copy the rest of the repository
13+
COPY . .
14+
15+
# Build the TypeScript sources
16+
RUN npm run build
17+
18+
# Run as the non-root user
19+
USER appuser
20+
21+
# The MCP server communicates over stdio, so no ports are exposed here.
22+
# If you want to connect to a Chrome instance running on the host,
23+
# start Chrome with a remote debugging port (e.g. 9222) and pass
24+
# --browser-url=http://host.docker.internal:9222 as an argument.
25+
#
26+
# Example:
27+
# docker run --rm -it chrome-devtools-mcp \
28+
# node build/src/index.js --browser-url=http://host.docker.internal:9222
29+
#
30+
# Default command: start the MCP server.
31+
CMD ["node", "build/src/index.js"]
32+

docs/claude-code-docs.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Claude Code Docs
2+
3+
## Docs
4+
5+
- [Orchestrate teams of Claude Code sessions](https://code.claude.com/docs/en/agent-teams.md): Coordinate multiple Claude Code instances working together as a team, with shared tasks, inter-agent messaging, and centralized management.
6+
- [Claude Code on Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock.md): Learn about configuring Claude Code through Amazon Bedrock, including setup, IAM configuration, and troubleshooting.
7+
- [Track team usage with analytics](https://code.claude.com/docs/en/analytics.md): View Claude Code usage metrics, track adoption, and measure engineering velocity in the analytics dashboard.
8+
- [Authentication](https://code.claude.com/docs/en/authentication.md): Learn how to configure user authentication and credential management for Claude Code in your organization.
9+
- [Best Practices for Claude Code](https://code.claude.com/docs/en/best-practices.md): Tips and patterns for getting the most out of Claude Code, from configuring your environment to scaling across parallel sessions.
10+
- [Changelog](https://code.claude.com/docs/en/changelog.md)
11+
- [Checkpointing](https://code.claude.com/docs/en/checkpointing.md): Track, rewind, and summarize Claude's edits and conversation to manage session state.
12+
- [Use Claude Code with Chrome (beta)](https://code.claude.com/docs/en/chrome.md): Connect Claude Code to your Chrome browser to test web apps, debug with console logs, automate form filling, and extract data from web pages.
13+
- [Claude Code on the web](https://code.claude.com/docs/en/claude-code-on-the-web.md): Run Claude Code tasks asynchronously on secure cloud infrastructure
14+
- [CLI reference](https://code.claude.com/docs/en/cli-reference.md): Complete reference for Claude Code command-line interface, including commands and flags.
15+
- [Common workflows](https://code.claude.com/docs/en/common-workflows.md): Step-by-step guides for exploring codebases, fixing bugs, refactoring, testing, and other everyday tasks with Claude Code.
16+
- [Manage costs effectively](https://code.claude.com/docs/en/costs.md): Track token usage, set team spend limits, and reduce Claude Code costs with context management, model selection, extended thinking settings, and preprocessing hooks.
17+
- [Data usage](https://code.claude.com/docs/en/data-usage.md): Learn about Anthropic's data usage policies for Claude
18+
- [Claude Code on desktop](https://code.claude.com/docs/en/desktop.md): Run Claude Code tasks locally or on secure cloud infrastructure with the Claude desktop app
19+
- [Development containers](https://code.claude.com/docs/en/devcontainer.md): Learn about the Claude Code development container for teams that need consistent, secure environments.
20+
- [Discover and install prebuilt plugins through marketplaces](https://code.claude.com/docs/en/discover-plugins.md): Find and install plugins from marketplaces to extend Claude Code with new commands, agents, and capabilities.
21+
- [Speed up responses with fast mode](https://code.claude.com/docs/en/fast-mode.md): Get faster Opus 4.6 responses in Claude Code by toggling fast mode.
22+
- [Extend Claude Code](https://code.claude.com/docs/en/features-overview.md): Understand when to use CLAUDE.md, Skills, subagents, hooks, MCP, and plugins.
23+
- [Claude Code GitHub Actions](https://code.claude.com/docs/en/github-actions.md): Learn about integrating Claude Code into your development workflow with Claude Code GitHub Actions
24+
- [Claude Code GitLab CI/CD](https://code.claude.com/docs/en/gitlab-ci-cd.md): Learn about integrating Claude Code into your development workflow with GitLab CI/CD
25+
- [Claude Code on Google Vertex AI](https://code.claude.com/docs/en/google-vertex-ai.md): Learn about configuring Claude Code through Google Vertex AI, including setup, IAM configuration, and troubleshooting.
26+
- [Run Claude Code programmatically](https://code.claude.com/docs/en/headless.md): Use the Agent SDK to run Claude Code programmatically from the CLI, Python, or TypeScript.
27+
- [Hooks reference](https://code.claude.com/docs/en/hooks.md): Reference for Claude Code hook events, configuration schema, JSON input/output formats, exit codes, async hooks, prompt hooks, and MCP tool hooks.
28+
- [Automate workflows with hooks](https://code.claude.com/docs/en/hooks-guide.md): Run shell commands automatically when Claude Code edits files, finishes tasks, or needs input. Format code, send notifications, validate commands, and enforce project rules.
29+
- [How Claude Code works](https://code.claude.com/docs/en/how-claude-code-works.md): Understand the agentic loop, built-in tools, and how Claude Code interacts with your project.
30+
- [Interactive mode](https://code.claude.com/docs/en/interactive-mode.md): Complete reference for keyboard shortcuts, input modes, and interactive features in Claude Code sessions.
31+
- [JetBrains IDEs](https://code.claude.com/docs/en/jetbrains.md): Use Claude Code with JetBrains IDEs including IntelliJ, PyCharm, WebStorm, and more
32+
- [Customize keyboard shortcuts](https://code.claude.com/docs/en/keybindings.md): Customize keyboard shortcuts in Claude Code with a keybindings configuration file.
33+
- [Legal and compliance](https://code.claude.com/docs/en/legal-and-compliance.md): Legal agreements, compliance certifications, and security information for Claude Code.
34+
- [LLM gateway configuration](https://code.claude.com/docs/en/llm-gateway.md): Learn how to configure Claude Code to work with LLM gateway solutions. Covers gateway requirements, authentication configuration, model selection, and provider-specific endpoint setup.
35+
- [Connect Claude Code to tools via MCP](https://code.claude.com/docs/en/mcp.md): Learn how to connect Claude Code to your tools with the Model Context Protocol.
36+
- [Manage Claude's memory](https://code.claude.com/docs/en/memory.md): Learn how to manage Claude Code's memory across sessions with different memory locations and best practices.
37+
- [Claude Code on Microsoft Foundry](https://code.claude.com/docs/en/microsoft-foundry.md): Learn about configuring Claude Code through Microsoft Foundry, including setup, configuration, and troubleshooting.
38+
- [Model configuration](https://code.claude.com/docs/en/model-config.md): Learn about the Claude Code model configuration, including model aliases like `opusplan`
39+
- [Monitoring](https://code.claude.com/docs/en/monitoring-usage.md): Learn how to enable and configure OpenTelemetry for Claude Code.
40+
- [Enterprise network configuration](https://code.claude.com/docs/en/network-config.md): Configure Claude Code for enterprise environments with proxy servers, custom Certificate Authorities (CA), and mutual Transport Layer Security (mTLS) authentication.
41+
- [Output styles](https://code.claude.com/docs/en/output-styles.md): Adapt Claude Code for uses beyond software engineering
42+
- [Claude Code overview](https://code.claude.com/docs/en/overview.md): Claude Code is an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools. Available in your terminal, IDE, desktop app, and browser.
43+
- [Configure permissions](https://code.claude.com/docs/en/permissions.md): Control what Claude Code can access and do with fine-grained permission rules, modes, and managed policies.
44+
- [Create and distribute a plugin marketplace](https://code.claude.com/docs/en/plugin-marketplaces.md): Build and host plugin marketplaces to distribute Claude Code extensions across teams and communities.
45+
- [Create plugins](https://code.claude.com/docs/en/plugins.md): Create custom plugins to extend Claude Code with skills, agents, hooks, and MCP servers.
46+
- [Plugins reference](https://code.claude.com/docs/en/plugins-reference.md): Complete technical reference for Claude Code plugin system, including schemas, CLI commands, and component specifications.
47+
- [Quickstart](https://code.claude.com/docs/en/quickstart.md): Welcome to Claude Code!
48+
- [Sandboxing](https://code.claude.com/docs/en/sandboxing.md): Learn how Claude Code's sandboxed bash tool provides filesystem and network isolation for safer, more autonomous agent execution.
49+
- [Security](https://code.claude.com/docs/en/security.md): Learn about Claude Code's security safeguards and best practices for safe usage.
50+
- [Claude Code settings](https://code.claude.com/docs/en/settings.md): Configure Claude Code with global and project-level settings, and environment variables.
51+
- [Set up Claude Code](https://code.claude.com/docs/en/setup.md): Install, authenticate, and start using Claude Code on your development machine.
52+
- [Extend Claude with skills](https://code.claude.com/docs/en/skills.md): Create, manage, and share skills to extend Claude's capabilities in Claude Code. Includes custom slash commands.
53+
- [Claude Code in Slack](https://code.claude.com/docs/en/slack.md): Delegate coding tasks directly from your Slack workspace
54+
- [Customize your status line](https://code.claude.com/docs/en/statusline.md): Configure a custom status bar to monitor context window usage, costs, and git status in Claude Code
55+
- [Create custom subagents](https://code.claude.com/docs/en/sub-agents.md): Create and use specialized AI subagents in Claude Code for task-specific workflows and improved context management.
56+
- [Optimize your terminal setup](https://code.claude.com/docs/en/terminal-config.md): Claude Code works best when your terminal is properly configured. Follow these guidelines to optimize your experience.
57+
- [Enterprise deployment overview](https://code.claude.com/docs/en/third-party-integrations.md): Learn how Claude Code can integrate with various third-party services and infrastructure to meet enterprise deployment requirements.
58+
- [Troubleshooting](https://code.claude.com/docs/en/troubleshooting.md): Discover solutions to common issues with Claude Code installation and usage.
59+
- [Use Claude Code in VS Code](https://code.claude.com/docs/en/vs-code.md): Install and configure the Claude Code extension for VS Code. Get AI coding assistance with inline diffs, @-mentions, plan review, and keyboard shortcuts.

examples/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Examples
2+
3+
## overtime.ag scraper (Python + Playwright + requests)
4+
5+
Scrapes odds/lines from [overtime.ag](https://overtime.ag/sports#/) using:
6+
7+
- **Playwright** to open the page once (obtain session cookies and pass Cloudflare).
8+
- **requests** to call the site’s JSON APIs (`GetSports`, `GetSportOffering`, and optional schedule).
9+
10+
### Setup
11+
12+
```bash
13+
cd examples
14+
pip install -r requirements-scraping.txt
15+
playwright install chromium
16+
```
17+
18+
### Usage
19+
20+
```bash
21+
# Default: NBA game lines
22+
python overtime_ag_scraper.py
23+
24+
# List all sports/leagues
25+
python overtime_ag_scraper.py --list-sports
26+
27+
# Another sport/league (use exact names from --list-sports)
28+
python overtime_ag_scraper.py --sport Soccer --league "Italy Serie A"
29+
30+
# Only fetch schedule event IDs (third-party API)
31+
python overtime_ag_scraper.py --schedule-only
32+
33+
# Show browser window (useful if Cloudflare challenges appear)
34+
python overtime_ag_scraper.py --no-headless
35+
```
36+
37+
### APIs used
38+
39+
| Purpose | Method | URL / Body |
40+
|----------------|--------|------------|
41+
| Session | Playwright | `GET https://overtime.ag/sports#/` |
42+
| Sports list | POST | `Offering.asmx/GetSports``{"getInactiveSports":false}` |
43+
| Game lines | POST | `Offering.asmx/GetSportOffering``{"sportType":"Basketball","sportSubType":"NBA",...}` |
44+
| Event IDs | GET | `https://bv2-us.digitalsportstech.com/api/schedule?sb=ticosports-asi` |
45+
46+
Cookie handling (and optional `cf_clearance`) is done via the Playwright session; the same cookies are then used in the `requests` session.

examples/overtime_ag_scraper.py

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
"""
2+
Example: Scrape odds/lines from overtime.ag using Playwright (session) + requests (API).
3+
4+
Usage:
5+
pip install playwright requests
6+
playwright install chromium
7+
8+
python overtime_ag_scraper.py # NBA lines (default)
9+
python overtime_ag_scraper.py --sport Soccer # list sports first, then use SportSubType
10+
python overtime_ag_scraper.py --schedule-only # only fetch schedule event IDs
11+
"""
12+
13+
from __future__ import annotations
14+
15+
import argparse
16+
import json
17+
import re
18+
from typing import Any
19+
20+
import requests
21+
from playwright.sync_api import sync_playwright
22+
23+
BASE = "https://overtime.ag"
24+
SPORTS_API = f"{BASE}/sports/Api/Offering.asmx/GetSports"
25+
OFFERING_API = f"{BASE}/sports/Api/Offering.asmx/GetSportOffering"
26+
SCHEDULE_URL = "https://bv2-us.digitalsportstech.com/api/schedule?sb=ticosports-asi"
27+
28+
USER_AGENT = (
29+
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
30+
"(KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
31+
)
32+
33+
34+
def _parse_asp_dates(obj: Any) -> Any:
35+
"""Convert ASP.NET /Date(ms)/ strings to ISO-like strings in place."""
36+
if isinstance(obj, dict):
37+
for k, v in list(obj.items()):
38+
obj[k] = _parse_asp_dates(v)
39+
return obj
40+
if isinstance(obj, list):
41+
return [_parse_asp_dates(x) for x in obj]
42+
if isinstance(obj, str) and re.match(r"^/Date\(\d+\)/$", obj):
43+
ms = int(re.search(r"\d+", obj).group())
44+
from datetime import datetime, timezone
45+
return datetime.fromtimestamp(ms / 1000.0, tz=timezone.utc).isoformat()
46+
return obj
47+
48+
49+
def get_session_cookies(headless: bool = True) -> list[dict]:
50+
"""Use Playwright to load the sports page and return cookies (handles Cloudflare)."""
51+
with sync_playwright() as p:
52+
browser = p.chromium.launch(headless=headless)
53+
context = browser.new_context(user_agent=USER_AGENT)
54+
page = context.new_page()
55+
56+
page.goto(f"{BASE}/sports#/", wait_until="networkidle", timeout=60_000)
57+
# Optional: wait for an API response so we know session is ready
58+
page.wait_for_timeout(2000)
59+
60+
cookies = context.cookies()
61+
browser.close()
62+
return cookies
63+
64+
65+
def session_with_cookies(cookies: list[dict]) -> requests.Session:
66+
"""Build a requests session with the given cookies and correct headers."""
67+
s = requests.Session()
68+
s.headers.update({
69+
"User-Agent": USER_AGENT,
70+
"Accept": "application/json, text/plain, */*",
71+
"Content-Type": "application/json",
72+
"Origin": BASE,
73+
"Referer": f"{BASE}/sports",
74+
})
75+
for c in cookies:
76+
s.cookies.set(c["name"], c["value"], domain=c.get("domain", ""))
77+
return s
78+
79+
80+
def get_sports(s: requests.Session, include_inactive: bool = False) -> list[dict]:
81+
"""Fetch sports/leagues catalog."""
82+
r = s.post(SPORTS_API, json={"getInactiveSports": include_inactive}, timeout=30)
83+
r.raise_for_status()
84+
data = r.json()
85+
return data.get("d", {}).get("Data", [])
86+
87+
88+
def get_sport_offering(
89+
s: requests.Session,
90+
sport_type: str,
91+
sport_sub_type: str,
92+
wager_type: str = "Straight Bet",
93+
) -> list[dict]:
94+
"""Fetch game lines for a sport/league."""
95+
payload = {
96+
"sportType": sport_type,
97+
"sportSubType": sport_sub_type,
98+
"wagerType": wager_type,
99+
"hoursAdjustment": 0,
100+
"periodNumber": None,
101+
"gameNum": None,
102+
"parentGameNum": None,
103+
"teaserName": "",
104+
"requestMode": None,
105+
}
106+
r = s.post(OFFERING_API, json=payload, timeout=30)
107+
r.raise_for_status()
108+
data = r.json()
109+
inner = data.get("d", {}).get("Data", {})
110+
if isinstance(inner, dict) and "GameLines" in inner:
111+
return inner["GameLines"]
112+
return []
113+
114+
115+
def get_schedule(s: requests.Session) -> list[dict]:
116+
"""Fetch schedule event IDs from third-party API (no auth in request)."""
117+
r = s.get(SCHEDULE_URL, timeout=15)
118+
r.raise_for_status()
119+
data = r.json()
120+
return data.get("data", [])
121+
122+
123+
def main() -> None:
124+
parser = argparse.ArgumentParser(description="Scrape overtime.ag odds (Playwright + requests)")
125+
parser.add_argument("--sport", default="Basketball", help="SportType (e.g. Basketball, Soccer)")
126+
parser.add_argument("--league", default="NBA", help="SportSubType (e.g. NBA, Italy Serie A)")
127+
parser.add_argument("--schedule-only", action="store_true", help="Only fetch schedule event IDs")
128+
parser.add_argument("--list-sports", action="store_true", help="List available sports and exit")
129+
parser.add_argument("--no-headless", action="store_true", help="Show browser window")
130+
args = parser.parse_args()
131+
132+
print("Getting session cookies via Playwright...")
133+
cookies = get_session_cookies(headless=not args.no_headless)
134+
s = session_with_cookies(cookies)
135+
136+
if args.schedule_only:
137+
events = get_schedule(s)
138+
print(json.dumps(events, indent=2))
139+
return
140+
141+
if args.list_sports:
142+
sports = get_sports(s)
143+
for x in sports:
144+
print(x.get("SportType"), "|", x.get("SportSubType"), "|", x.get("FirstRotNum"))
145+
return
146+
147+
lines = get_sport_offering(s, args.sport, args.league)
148+
# Normalize ASP.NET dates for readability
149+
_parse_asp_dates(lines)
150+
151+
for g in lines:
152+
print(
153+
g.get("GameDateTimeString"),
154+
"|",
155+
g.get("Team1ID"),
156+
"vs",
157+
g.get("Team2ID"),
158+
"| spread",
159+
g.get("Spread"),
160+
"| ml",
161+
g.get("MoneyLine1"),
162+
"/",
163+
g.get("MoneyLine2"),
164+
"| total",
165+
g.get("TotalPoints"),
166+
)
167+
print(f"\nTotal: {len(lines)} games")
168+
169+
170+
if __name__ == "__main__":
171+
main()

examples/requirements-scraping.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# For examples/overtime_ag_scraper.py
2+
# pip install -r requirements-scraping.txt && playwright install chromium
3+
playwright>=1.40.0
4+
requests>=2.31.0

0 commit comments

Comments
 (0)