@letsscrapedata/scraper 0.0.85 → 0.0.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +7 -5
- package/readme.md +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letsscrapedata/scraper",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.87",
|
|
4
4
|
"description": "Web scraper that scraping web pages by LetsScrapeData XML template",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "tsup src/index.ts --format cjs,esm --dts --clean",
|
|
21
|
-
"watch": "npm run build -- --watch src"
|
|
21
|
+
"watch": "npm run build -- --watch src",
|
|
22
|
+
"terser1": " terser dist/index.js -c -m -o dist/index.js ",
|
|
23
|
+
"terser2": " terser dist/index.cjs -c -m -o dist/index.cjs "
|
|
22
24
|
},
|
|
23
25
|
"repository": {
|
|
24
26
|
"type": "git",
|
|
@@ -46,9 +48,9 @@
|
|
|
46
48
|
"captcha"
|
|
47
49
|
],
|
|
48
50
|
"dependencies": {
|
|
49
|
-
"@letsscrapedata/controller": "^0.0.
|
|
50
|
-
"@letsscrapedata/proxy": "^0.0.
|
|
51
|
-
"@letsscrapedata/utils": "^0.0.
|
|
51
|
+
"@letsscrapedata/controller": "^0.0.68",
|
|
52
|
+
"@letsscrapedata/proxy": "^0.0.26",
|
|
53
|
+
"@letsscrapedata/utils": "^0.0.28",
|
|
52
54
|
"cheerio": "^1.0.0",
|
|
53
55
|
"dateformat": "^4.6.3",
|
|
54
56
|
"download": "^8.0.0",
|
package/readme.md
CHANGED
|
@@ -58,12 +58,12 @@ import { scraper } from "@letsscrapedata/sraper";
|
|
|
58
58
|
/**
|
|
59
59
|
* tid: ID of template to be executed, such as template for scraping one list of example in page "https://www.letsscrapedata.com/pages/listexample1.html"
|
|
60
60
|
* parasstrs: input parameters of tasks, such as "1"
|
|
61
|
-
* this example will execute five tasks using template
|
|
61
|
+
* this example will execute five tasks using template 10001, each of them scrapes the data in one page.
|
|
62
62
|
*/
|
|
63
|
-
const newTasks = [{ tid:
|
|
63
|
+
const newTasks = [{ tid: 10001, parasstrs: ["1", "2", "3", "4", "5"] }];
|
|
64
64
|
|
|
65
65
|
/* The following line can do the same thing using subtasks, scraping the data in the first five pages */
|
|
66
|
-
// const newTasks = [{ tid:
|
|
66
|
+
// const newTasks = [{ tid: 10002, parasstrs: ["5"] }];
|
|
67
67
|
|
|
68
68
|
await scraper(newTasks);
|
|
69
69
|
```
|
|
@@ -90,7 +90,7 @@ const scraperConfig: ScraperConfig = {
|
|
|
90
90
|
// captcha: { clientKey: "xxx" } // to solve captcha using 2captca
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
const newTasks: TemplateTasks[] = [{ tid:
|
|
93
|
+
const newTasks: TemplateTasks[] = [{ tid: 10002, parasstrs: ["9"] }];
|
|
94
94
|
|
|
95
95
|
await scraper(newTasks, scraperConfig);
|
|
96
96
|
```
|