@imenam/simple-scraper 1.0.4 → 1.0.6
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/README.md +7 -2
- package/dist/logger.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ PUPPETEER_TIMEOUT=30000
|
|
|
61
61
|
|
|
62
62
|
## Usage with Claude Desktop
|
|
63
63
|
|
|
64
|
-
Add the following to your `claude_desktop_config.json
|
|
64
|
+
Add the following to your `claude_desktop_config.json`. Full example with all available options:
|
|
65
65
|
|
|
66
66
|
```json
|
|
67
67
|
{
|
|
@@ -71,7 +71,12 @@ Add the following to your `claude_desktop_config.json`:
|
|
|
71
71
|
"args": ["@imenam/simple-scraper"],
|
|
72
72
|
"env": {
|
|
73
73
|
"PUPPETEER_HEADLESS": "true",
|
|
74
|
-
"PUPPETEER_TIMEOUT": "30000"
|
|
74
|
+
"PUPPETEER_TIMEOUT": "30000",
|
|
75
|
+
"COOKIES_DIR": "/path/to/your/cookies",
|
|
76
|
+
"MCP_LOG_DIR": "/path/to/your/logs",
|
|
77
|
+
"PROXY_URL": "http://localhost:4500",
|
|
78
|
+
"PROXY_APP_PATH": "/simple-scraper",
|
|
79
|
+
"PROXY_APP_NAME": "Simple Scraper"
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
82
|
}
|
package/dist/logger.js
CHANGED
|
@@ -2,9 +2,10 @@ import fs from "fs";
|
|
|
2
2
|
import path from "path";
|
|
3
3
|
let currentPrefix = "";
|
|
4
4
|
export function logToFile(message, prefix = "") {
|
|
5
|
-
const
|
|
5
|
+
const defaultLogDir = process.platform === 'win32'
|
|
6
6
|
? 'C:\\var\\log\\simple-scraper-mcp'
|
|
7
7
|
: '/var/log/simple-scraper-mcp';
|
|
8
|
+
const logDir = process.env.MCP_LOG_DIR ?? defaultLogDir;
|
|
8
9
|
const logFile = path.join(logDir, 'server.log');
|
|
9
10
|
const now = new Date().toLocaleString('fr-FR', {
|
|
10
11
|
year: 'numeric',
|