sensitive-blue•3y ago
How to add data to the SDK_CRAWLER_STATISTICS
I want to add some counts to the SDK_CRAWLER_STATISTICS json. I found the solution to create a own file like this
await KeyValueStore.setValue("statistics", statistics);
but i would prefer to add it to the existing statistics1 Reply
metropolitan-bronze•3y ago
You can add property to the statistics state
https://crawlee.dev/api/core/class/Statistics#state
For example, I add
mydata
count:
Statistics | API | Crawlee
The statistics class provides an interface to collecting and logging run
statistics for requests.
All statistic information is saved on key value store
under the key
SDK_CRAWLER_STATISTICS_*
, persists between
migrations and abort/resurrect