Extractor.stop()
This commit is contained in:
		
							
								
								
									
										13
									
								
								readme.md
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								readme.md
									
									
									
									
									
								
							| @ -13,10 +13,14 @@ All you need to do is: | ||||
| ## Qucik Start | ||||
|  | ||||
| Extract current page | ||||
|  | ||||
| ```js | ||||
| $('.item', ['a', 'a@href']); | ||||
| new Extractor().task('.item', ['a', 'a@href']).start(); | ||||
| ``` | ||||
|  | ||||
| > `$(...args)` is the short form of `new Extractor().task(...args).start();`, which is introduced later. | ||||
|  | ||||
| Extract multiple pages (1-10, interval 1) | ||||
|  | ||||
| ```js | ||||
| @ -54,6 +58,15 @@ function (itemsSelector:string, fieldSelectors:string[], urls:ExtractResult) | ||||
|  | ||||
| Close the target tab, in which current tasks is running. | ||||
|  | ||||
| Or use `job.stop()`: | ||||
|  | ||||
| ```js | ||||
| job = new Extractor().task('.search-list-item', ['a@href'], ["http://sample.com/abc"]) | ||||
|     .task('list-item', ["a.title", "p.content"]) | ||||
|     .start(); | ||||
| job.stop(); | ||||
| ``` | ||||
|  | ||||
| ## Extract Attributes. | ||||
|  | ||||
| e.g.: link text and target (use 'selector@attribute') | ||||
|  | ||||
		Reference in New Issue
	
	Block a user