update signitures tip
This commit is contained in:
@ -2,40 +2,20 @@ const signitures = `
|
|||||||
# DataExtracter Help
|
# DataExtracter Help
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
## Signitures:
|
## Usage
|
||||||
|
new Extractor().task(...args).task(...args).start();
|
||||||
|
|
||||||
|
## Extractor.task() Signitures:
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
function extract(itemsSelector:string, fieldSelectors:string[])
|
task(itemsSelector:string, fieldSelectors:string[])
|
||||||
function extract(itemsSelector:string, fieldSelectors:string[], url:string, from:number, to:number, interval:number)
|
task(itemsSelector:string, fieldSelectors:string[], url:string, from:number, to:number, interval:number)
|
||||||
function extract(itemsSelector:string, fieldSelectors:string, url:string, pages:number[])
|
task(itemsSelector:string, fieldSelectors:string, url:string, pages:number[])
|
||||||
function extract(itemsSelector:string, fieldSelectors:string[], urls:string[])
|
task(itemsSelector:string, fieldSelectors:string[], urls:string[])
|
||||||
function extract(itemsSelector:string, fieldSelectors:string[], urls:ExractResult)
|
task(itemsSelector:string, fieldSelectors:string[], urls:ExractResult)
|
||||||
|
|
||||||
## Examples:
|
See detail help in:
|
||||||
----------------------------
|
https://git.jebbs.co/jebbs/data-extracter-extesion
|
||||||
|
|
||||||
### Extract current page
|
|
||||||
extract(".list-item", ["a.title", "p.content"])
|
|
||||||
|
|
||||||
### Extract multiple pages (1-10, interval 1)
|
|
||||||
extract(".list-item", ["a.title", "p.content"],"http://sample.com/?pn=\${page}", 1, 10, 1)
|
|
||||||
|
|
||||||
### Extract multiple urls (list)
|
|
||||||
extract(".list-item", ["a.title", "p.content"],["http://sample.com/abc","http://sample.com/xyz"])
|
|
||||||
|
|
||||||
### Extract specified pages (1,3,5)
|
|
||||||
extract(".list-item", ["a.title", "p.content"], "http://sample.com/?pn=\${page}", [1, 3, 5])
|
|
||||||
|
|
||||||
## Advanced Examples:
|
|
||||||
----------------------------
|
|
||||||
|
|
||||||
### Extract link text and target (use 'selector@attribute')
|
|
||||||
extract('.list-item', ['a.title', 'a.title@href'])
|
|
||||||
|
|
||||||
### Collect links from page(s) & Extract data of each link
|
|
||||||
>> (Available only in console of extension background page)
|
|
||||||
|
|
||||||
extract('body',["a.title", "p.content"], await getData('.list-item', ['.item a@href'],["http://sample.com/abc"]))
|
|
||||||
`.trim();
|
`.trim();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user