add documentation

This commit is contained in:
Simon Vieille 2020-04-15 10:34:47 +02:00
parent 229242ed11
commit 5619191a00
Signed by: deblan
GPG key ID: 03383D15A1D31745

View file

@ -32,17 +32,17 @@ const scraper = require('deblan-scraper')
const options = {
url: 'https://github.com/foo/bar',
acceptAllStatus: false, // Optional
method: 'GET', // Optional
acceptAllStatus: false, // Optional, default is `false`
method: 'GET', // Optional, default is `GET`
}
const selector = '.repository-content .numbers-summary li:nth-child(4) a'
const filters = {
tags: null,
breaks: null,
spaces: null,
trim: null,
tags: null, // Removes tags. You can specify the tags to remove (separated by comma)
breaks: null, // Removes breaks (\n, \r)
spaces: null, // Replaces 2 successive spaces by 1, except breaks
trim: null, // Strips whitespaces from the beginning and end of the value
}
scraper(