Skip to content
This repository has been archived by the owner on May 29, 2021. It is now read-only.
/ drowsy Public archive

WordPress automation made with puppeteer and typescript

Notifications You must be signed in to change notification settings

lab-yue/drowsy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drowsy

WordPress automation made with puppeteer and typescript

Install

yarn add puppeteer typescript @faya/drowsy

Usage

see example

Setup config

WordPress version is needed for selectors.

import drowsy from '@faya/drowsy';

const config: drowsy.Config = {
    wp: {
        ver: '5.0.3',
        url: 'https://your.wordpress.com',
        user: '__username__',
        password: '__password__'
    },
    LaunchOptions: {
        headless: false
    }
};

make new post content

const newpost: drowsy.Post = {
    title: 'drowsy',
    type: 'blog',
    content: 'post this by drowsy!'
};

Run it

(async () => {
    const wp = await drowsy.launch(config);
    await wp.login();
    await wp.post(newpost);
    await wp.close();
})();

About

WordPress automation made with puppeteer and typescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published