@definisi/vidsrc-scraper 2.0.0 → 2.0.1

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.
Files changed (2) hide show
  1. package/README.md +21 -29
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,20 +1,11 @@
1
1
  # @definisi/vidsrc-scraper
2
2
 
3
- Extract HLS streaming URLs from VidSrc using Playwright.
4
-
5
- ## ⚠️ Important Notice
6
-
7
- VidSrc currently uses Cloudflare Turnstile CAPTCHA protection. This means:
8
-
9
- 1. **Headless mode doesn't work** - The scraper must run with a visible browser (`headless: false`)
10
- 2. **Manual CAPTCHA solving may be required** - You may need to complete the Turnstile challenge manually
11
- 3. **Automation is limited** - Fully automated scraping is currently not possible due to bot detection
3
+ Extract HLS streaming URLs from VidSrc using pure HTTP requests.
12
4
 
13
5
  ## Installation
14
6
 
15
7
  ```bash
16
- npm install @definisi/vidsrc-scraper playwright
17
- npx playwright install firefox
8
+ npm install @definisi/vidsrc-scraper
18
9
  ```
19
10
 
20
11
  ## Usage
@@ -23,10 +14,7 @@ npx playwright install firefox
23
14
  import { scrapeVidsrc } from '@definisi/vidsrc-scraper';
24
15
 
25
16
  // Scrape a movie by TMDB ID
26
- const result = await scrapeVidsrc('27205', 'movie', null, null, {
27
- timeout: 120000,
28
- headless: false, // Must be false for Turnstile
29
- });
17
+ const result = await scrapeVidsrc('27205', 'movie');
30
18
 
31
19
  if (result.success) {
32
20
  console.log('HLS URL:', result.hlsUrl);
@@ -34,19 +22,22 @@ if (result.success) {
34
22
  }
35
23
 
36
24
  // Scrape a TV episode
37
- const tvResult = await scrapeVidsrc('1399', 'tv', '1', '1', {
38
- timeout: 120000,
39
- headless: false,
40
- });
25
+ const tvResult = await scrapeVidsrc('1399', 'tv', '1', '1');
41
26
  ```
42
27
 
43
28
  ## Options
44
29
 
45
30
  | Option | Type | Default | Description |
46
31
  |--------|------|---------|-------------|
47
- | timeout | number | 120000 | Total timeout in milliseconds |
32
+ | timeout | number | 30000 | Request timeout in milliseconds |
48
33
  | cacheTtl | number | 900 | Cache time-to-live in seconds |
49
- | headless | boolean | false | Run browser in headless mode (not recommended) |
34
+
35
+ ```typescript
36
+ const result = await scrapeVidsrc('27205', 'movie', null, null, {
37
+ timeout: 60000,
38
+ cacheTtl: 1800,
39
+ });
40
+ ```
50
41
 
51
42
  ## Result Type
52
43
 
@@ -68,21 +59,22 @@ interface ScrapeResult {
68
59
  The HLS URLs require proper headers. Example with VLC:
69
60
 
70
61
  ```bash
71
- vlc "HLS_URL" --http-user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0"
62
+ vlc "HLS_URL" \
63
+ --http-user-agent="Mozilla/5.0" \
64
+ --http-referrer="https://cloudnestra.com/"
72
65
  ```
73
66
 
74
- ## Limitations
67
+ ## How It Works
75
68
 
76
- - Requires Playwright and Firefox browser
77
- - Requires visible browser window (headless mode blocked by Turnstile)
78
- - May require manual CAPTCHA completion
79
- - Results are cached to reduce CAPTCHA occurrences
80
- - VidSrc may change their protection at any time
69
+ 1. Fetches embed page from `vidsrc-embed.ru`
70
+ 2. Extracts RCP iframe URL from cloudnestra.com
71
+ 3. Extracts prorcp hash from RCP page
72
+ 4. Fetches M3U8 URL from prorcp endpoint
73
+ 5. Resolves domain placeholders (`{v1}` - `{v5}` -> `cloudnestra.com`)
81
74
 
82
75
  ## Requirements
83
76
 
84
77
  - Node.js 18+
85
- - Playwright
86
78
 
87
79
  ## License
88
80
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@definisi/vidsrc-scraper",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Extract HLS streaming URLs from VidSrc using axios",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",