Skip to content

MCluck90/eidolon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eidolon

A simple way to automate tasks in a headless browser.

DEPRECATED

This package was made ages ago and makes baby Jesus cry with how badly it works. Feel free to mess with it but I'm not responsible if you accidentally raise Hells minions.

How it Works

Eidolon works through a series of "steps" defined in a configuration file and, optionally, paired with a data file.

Example

Here is a basic example of performing a search using Google

Configuration: google.json

{
    "name": "Example Job",
    "initURL": "https://www.google.com",
    "steps": [
        {
            "name": "Google 'Google'",
            "confirm": {
                "selector": "title",
                "attribute": "text",
                "value": "Google"
            },
            "link": {
                "selector": "form[action='/search']",
                "submit": true
            }
        },
        {
            "name": "Click First Result",
            "confirm": {
                "selector": "h3.r",
                "exists": true
            },
            "link": {
                "selector": "h3.r:first-child a",
                "follow": true
            }
        }
    ]
}

Data: google-data.json

{
    "name": "Example Job",
    "steps": [
        {
            "name": "Google 'Eidolon'",
            "fields": {
                "input[name='q']": {
                    "value": "Eidolon",
                    "keypress": true,
                    "enter": true
                }
            }
        }
    ]
}

app.js

var eidolon = require('eidolon');

eidolon.createJob({
    autostart: true,
    configPath: require.resolve('./google.json'),
    dataPath: require.resolve('./google-data.json')
});

This will run a job which searches Google for "Eidolon."

More comprehensive documentation coming later.

About

A simple way to automate tasks in a headless browser.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published