Cleans up the local storage folder (defaults to ./storage) created when running code locally.
Purging empties the storages that belong to a single run — the default one and every alias-keyed one —
keeping only INPUT.json in the default KV store. Named storages persist across runs and are not touched.
Purging of storages is happening automatically when we run our crawler (or when we open some storage
explicitly, e.g. via RequestList.open()). We can disable that via purgeOnStartConfiguration
option or by setting CRAWLEE_PURGE_ON_START environment variable to 0 or false.
This is a shortcut for running (optional) purge method on the StorageBackend interface, in other words
it will call the purge method of the underlying storage implementation we are currently using. You can
make sure the storage is purged only once for a given execution context if you set onlyPurgeOnce to true in
the options object
Cleans up the local storage folder (defaults to
./storage) created when running code locally. Purging empties the storages that belong to a single run — the default one and every alias-keyed one — keeping only INPUT.json in the default KV store. Named storages persist across runs and are not touched.Purging of storages is happening automatically when we run our crawler (or when we open some storage explicitly, e.g. via
RequestList.open()). We can disable that viapurgeOnStartConfiguration option or by settingCRAWLEE_PURGE_ON_STARTenvironment variable to0orfalse.This is a shortcut for running (optional)
purgemethod on the StorageBackend interface, in other words it will call thepurgemethod of the underlying storage implementation we are currently using. You can make sure the storage is purged only once for a given execution context if you setonlyPurgeOncetotruein theoptionsobject