update readme

This commit is contained in:
2020-01-17 11:01:13 +08:00
parent 63aec616b1
commit ade0670415

View File

@ -185,6 +185,23 @@ e.start();
> The uploaded state will be cleaned in 30 seconds, if you don't load it.
## Watch Mode
Watch mode tries to exract data from every page you visit **in current window**.
```js
e = new Extractor();
e.task('.search-list-item', ['a@href'], ["http://sample.com/abc"])
.task('list-item', ["a.title", "p.content"]);
e.watch(1); // start watching for first task
```
To stop watching, you can either `close current window`, or:
```js
e.stop();
```
## Developpment
Clone this project and execute: