Check Crawler Results avatar
Check Crawler Results

No credit card required

View all Actors
Check Crawler Results

Check Crawler Results

drobnikj/check-crawler-results

No credit card required

Act checks first 100 results from crawler execution agains json schema. It returns validation errors to act log file. It sends mail if one or more results is not valid. ==Environment vars== - JSON_SCHEMA json schema for validation - MAILGUN_API_KEY mailgun api key for sending mail from act - MAI...

apify-act-check-crawler-results

This act checks crawler results or default act dataset items and send notification if finds some errors. It is designed to run from crawler finish webhook.

Usage Crawler

For a specific crawler set the following parameters:

Finish webhook URL (finishWebhookUrl)

https://api.apify.com/v2/acts/drobnikj~check-crawler-results/runs?token=APIFY_API_TOKEN

Finish webhook data

sampleCount

  • Number
  • Number of results that act checks
  • Default is 1000

minOutputtedPages

  • Number
  • Indicates minimum outputted pages of crawler to checks if attribute is set.

jsonSchema

  • Object
  • If jsonSchema is set act check all sample results against schema.

compareWithPreviousExecution

  • Boolean
  • If compareWithPreviousExecution is set to true act compare results with previous execution.
  • If tag for execution is set compare act result from previous results with same tag.

notifyTo

  • String
  • Mail where act send notification if found error

runActOnSuccess

  • Object
  • If act found errors runs this act.
  • Example:
1{
2    "id": "apify/send-mail",
3    "input": {
4        "to": "jakub.drobnik@apify.com",
5        "subject": "test on success",
6        "text": "No errors in crawler Amazon"
7    }
8}

NOTE: If you didn't set input, it set from input of main act and errors output.

runActOnError

  • Object
  • If didn't find any errors runs this act.
  • Same format as runActOnSuccess

Usage Act

You can call it from other Act, for example:

1await Apify.call('drobnikj/check-crawler-results', {
2    actId: 's7Jj8ik07gfV',
3    runId: 'sd86hGfHk0Uh6gF',
4    options: {
5        minOutputtedPages: 1000,
6    }
7});

actId

  • String
  • Act ID you want to check

runId

  • String
  • Run ID of act you want to check

options

  • Object
  • Options for checking
  • There are same params as in Finish webhook data except compareWithPreviousExecution
  • sampleCount, jsonSchema, notifyTo, runActOnSuccess, runActOnError
Developer
Community logoMaintained by Community
Actor metrics
  • 0 monthly users
  • Modified over 5 years ago
Categories

You might also like these Actors