CA
wise-white
Apify Actor Input param is not working.
Now I'm building actor in apify. But I have one problem for input value of actor.
I can't get input value in code. Following is my code.
const startUrls = Actor.getInput();
It return NULL value. Please let me know what is problem.
{
"title": "CheerioCrawler Template",
"type": "object",
"schemaVersion": 1,
"properties": {
"startUrls": {
"title": "Start URLs",
"type": "array",
"description": "URLs to start with.",
"editor": "requestListSources",
"prefill": [
{
"url": "https://apify.com"
}
]
}
}
}
This is input schema.5 Replies
Hello @Harry Is your code after actor being initialized?
wise-whiteOP•3y ago
Of course, I tried between init and exit.
@Harry just advanced to level 1! Thanks for your contributions! 🎉
const startUrls = Actor.getInput();
this is wrong, you are missing awaitwise-whiteOP•3y ago
ah right. you are right. Thanks for your help. 👍