Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
miroshnikov authored Dec 28, 2021
1 parent 43e2bc1 commit 1dacae5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ npm install -g scrapyteer
scrapyteer --config myconf.js
```
Make sure `$NODE_PATH` points to where global packages are located.
If it is not, you may need to set it e.g. `export NODE_PATH=/path/to/global/node_modules`
If it doesn't, you may need to set it e.g. `export NODE_PATH=/path/to/global/node_modules`

## Examples
Scrapyteer uses a configuration file (`scrapyteer.config.js` by default). Here are some examples:
Expand Down Expand Up @@ -153,14 +153,16 @@ A file name or `console` object, by default `output.json` in the current directo
The root URL to scrape
#### parse
The parsing workflow, a `pipe` function, an object or an array
#### noRevisit
Set `true` to not revisit already visited pages

## API
#### pipe(...any)
Receives a set of functions and invoke them from left to right supplying the return value of the previous as input for the next. If an argument is not a function, it is converted to one (by `indentity`). For objects and arrays all of their items/properties are also parsed. If the return value is an array, the rest of the function chain will be invoked for all of its items.
#### open()
Opens a given or root url
#### $(selector: string) / $$(selector: string)
Receives a page and calls `querySelector` / `querySelectorAll`
Calls `querySelector` / `querySelectorAll` on page/element
#### attr(name: string)
Returns an element's property value
#### text
Expand Down

0 comments on commit 1dacae5

Please sign in to comment.