Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions docs/02_concepts/code/06_interacting_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ async def main() -> None:
# Start the apify/screenshot-url Actor.
actor_run = await Actor.call(
actor_id='apify/screenshot-url',
run_input={'url': 'http://example.com', 'delay': 10000},
run_input={
'urls': [{'url': 'https://www.apify.com/'}],
'delay': 1000,
'waitUntil': 'load',
},
)

if actor_run is None:
Expand All @@ -18,10 +22,10 @@ async def main() -> None:
run_client = Actor.apify_client.run(actor_run.id)
await run_client.wait_for_finish()

# Get the Actor output from the key-value store.
kvs_client = run_client.key_value_store()
output = await kvs_client.get_record('OUTPUT')
Actor.log.info(f'Actor output: {output}')
# Get the Actor output from the dataset.
dataset_client = run_client.dataset()
item_list = await dataset_client.list_items()
Actor.log.info(f'Actor output: {item_list.items}')


if __name__ == '__main__':
Expand Down