feat: add Playwright support for browser automation in plugins

- Updated .dockerignore and .gitignore to exclude Playwright-related files.
- Added Playwright-Go dependency in go.mod and updated go.sum.
- Implemented jsPlaywright function in js_api.go for browser-based requests.
- Enhanced README.md to document the new Playwright functionality for plugins.
This commit is contained in:
krau
2025-11-07 11:07:47 +08:00
parent f0853536d9
commit f80ecae3cc
8 changed files with 165 additions and 9 deletions

View File

@@ -23,12 +23,13 @@ type Resource struct {
Filename string `json:"filename"` // with ext
MimeType string `json:"mime_type"`
Extension string `json:"extension"` // e.g. "mp4"
Size int64 `json:"size"` // 0 when unknown
Hash map[string]string `json:"hash"` // {"md5": "...", "sha256": "..."}
Headers map[string]string `json:"headers"` // HTTP headers when downloading
Size int64 `json:"size"` // 0 when unknown
Hash map[string]string `json:"hash"` // {"md5": "...", "sha256": "..."}
Headers map[string]string `json:"headers"` // HTTP headers when downloading
Extra map[string]any `json:"extra"`
}
// Item represents a parsed item with metadata and resources.
type Item struct {
Site string `json:"site"`
URL string `json:"url"` // original URL of the item