The Apify platform expects the actor entry at .actor/src/main.py. Until
now Pry used `python -m apify_actor` via Dockerfile.apify, which works
but doesn't match the documented convention used by every other actor
on the platform.
- Add .actor/src/main.py as a thin asyncio wrapper around apify_actor.main()
- Swap Dockerfile.apify ENTRYPOINT to the new path
- Add `make actor-build` Makefile target that regenerates
.actor/input_schema.json from the ApifySchemaBuilder fluent API
(urls, max_pages, timeout, output_format, crawl)
Conflicts: none — .actor/actor.json (full version:3.0.0 schema with
input/output blocks inline) already existed from earlier work; this
commit adds the conventional entry path and a build hook that emits
the schema as a sibling file. Apify Console accepts either form.
48 lines
No EOL
944 B
JSON
48 lines
No EOL
944 B
JSON
{
|
|
"title": "Pry Scraper",
|
|
"type": "object",
|
|
"schemaVersion": 1,
|
|
"properties": {
|
|
"urls": {
|
|
"title": "URLs to scrape",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "^https?://"
|
|
}
|
|
},
|
|
"max_pages": {
|
|
"title": "Max pages",
|
|
"type": "integer",
|
|
"default": 10,
|
|
"minimum": 1,
|
|
"maximum": 1000
|
|
},
|
|
"timeout": {
|
|
"title": "Timeout (seconds)",
|
|
"type": "integer",
|
|
"default": 30,
|
|
"minimum": 5,
|
|
"maximum": 120
|
|
},
|
|
"output_format": {
|
|
"title": "Output format",
|
|
"type": "string",
|
|
"default": "markdown",
|
|
"enum": [
|
|
"markdown",
|
|
"html",
|
|
"text"
|
|
]
|
|
},
|
|
"crawl": {
|
|
"title": "Crawl linked pages",
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"description": "Scrape any website with Pry's 12-tier fallback chain.",
|
|
"required": [
|
|
"urls"
|
|
]
|
|
} |