forked from extern/se-scraper
added handle_results
This commit is contained in:
@ -68,7 +68,7 @@ module.exports.handler = async function handler (config, context, callback) {
|
||||
|
||||
let launch_args = {
|
||||
args: ADDITIONAL_CHROME_FLAGS,
|
||||
headless: config.headless !== false,
|
||||
headless: config.headless,
|
||||
};
|
||||
|
||||
if (config.debug === true) {
|
||||
@ -149,6 +149,13 @@ module.exports.handler = async function handler (config, context, callback) {
|
||||
results = zlib.deflateSync(results).toString('base64');
|
||||
}
|
||||
|
||||
if (pluggable && pluggable.handle_results) {
|
||||
await pluggable.handle_results({
|
||||
config: config,
|
||||
results: results,
|
||||
});
|
||||
}
|
||||
|
||||
if (config.write_meta_data === true) {
|
||||
metadata.id = `${config.job_name} ${config.chunk_lines}`;
|
||||
metadata.chunk_lines = config.chunk_lines;
|
||||
|
Reference in New Issue
Block a user