minor changes

This commit is contained in:
Nikolai Tschacher 2019-01-27 22:11:41 +01:00
parent a20b6c79a9
commit c5e3e84e1d
3 changed files with 5 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "se-scraper",
"version": "1.0.5",
"version": "1.1.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "se-scraper",
"version": "1.1.3",
"version": "1.1.5",
"description": "A simple module which uses puppeteer to scrape several search engines.",
"homepage": "https://scrapeulous.com/",
"main": "index.js",

View File

@ -20,12 +20,13 @@ function write_results(fname, data) {
});
}
module.exports.handler = async function handler (config, context, callback) {
module.exports.handler = async function handler (event, context, callback) {
config = event;
pluggable = null;
if (config.custom_func && fs.existsSync(config.custom_func)) {
try {
Pluggable = require(config.custom_func);
pluggable = new Pluggable();
pluggable = new Pluggable({config:config});
} catch (exception) {
console.error(exception);
}