A Node.js Express server that scrapes video streaming URLs (HLS .m3u8 links) and subtitle URLs from multiple VidSrc provider domains using Playwright.
- Scrapes multiple VidSrc domains for movie and TV stream URLs.
- Extracts HLS video
.m3u8URLs and subtitle files (.vtt,.srt). - Headless browser automation with Playwright and Chromium.
- Takes screenshots of the stream page during scraping (saved in
/screenshots). - Simple REST API with
/extractendpoint. - Ready for deployment on Railway or any Docker-compatible host.
- Node.js v16 or higher installed.
- Docker installed (optional, recommended for deployment).
- Git (for version control).
-
Clone the repository:
git clone https://github.com/yourusername/your-repo.git cd your-repo -
Install dependencies: npm install
-
Run the server locally: npm start
By default, the server listens on port 3000. To use a different port, set the environment variable: PORT=4000
Endpoint: /extract Method: GET
Extract video stream URLs and subtitles.
tmdb_id string Yes TMDB movie or TV show ID type string No "movie" (default) or "tv" season integer Required if type=tv TV show season number episode integer Required if type=tv TV show episode number
Movie
GET /extract?tmdb_id=550&type=movieTV Show
GET /extract?tmdb_id=1399&type=tv&season=1&episode=1Response Format:
{
"success": true,
"results": {
"https://vidsrc.xyz": {
"hls_url": "https://example.m3u8",
"subtitles": [
"https://example.vtt"
],
"error": null
},
"https://vidsrc.in": {
"hls_url": "https://example.m3u8",
"subtitles": [
"https://example.vtt"
],
"error": null
},
"https://vidsrc.pm": {
"hls_url": "https://example.m3u8",
"subtitles": [
"https://example.vtt"
],
"error": null
},
"https://vidsrc.net": {
"hls_url": "https://example.m3u8",
"subtitles": [
"https://example.vtt"
],
"error": null
}
}
}