TheTvApp StreamScraper is an innovative server application built on Express, designed to streamline access to HLS live TV streams by dynamically scraping and maintaining updated stream URLs from the thetvapp.to
website. It combines web scraping with automated browser interactions to offer an efficient and user-friendly way to enjoy live TV channels.
- HLS Streaming: Specialized in fetching HLS (HTTP Live Streaming) links for high-quality TV streaming.
- Dynamic Channel Listing: Automatically retrieves and refreshes the list of available TV channels from
thetvapp.to
. - Automated Token Retrieval: Uses Puppeteer to automate the process of token management, ensuring uninterrupted access to streams.
- Efficient Caching: Implements caching for both channel listings and HLS stream URLs, optimizing performance and reducing load.
- Quality Selection: Prioritizes high-bitrate HLS streams when available, delivering superior video quality.
- Stream URL Auto-Refresh: Periodically updates stream URLs to keep them active, ensuring consistent access to TV channels.
- M3U Playlist Integration: Generates and serves M3U playlists, making it easy to use with various media players that support streaming.
- Node.js (v14 or later recommended)
- npm (v6 or later)
- Docker (if running with Docker)
- Pull the Docker image from Docker Hub:
docker pull habitual69/thetvappstream
To run the server using Docker in host network mode:
docker run --network host habitual69/thetvappstream
Upon starting, the server will fetch the necessary token and channel listings. Access the channel playlist via http://localhost:5000/channels.m3u
and individual HLS stream URLs by visiting http://localhost:5000/channel/{channelID}
.
- Clone the repository:
git clone https://github.com/habitual69/thetvappstream.git
cd thetvappstream
- Install the dependencies:
npm install
- Set up environment variables:
Rename the .env_example
file to .env
and adjust the variables as needed for your setup.
PORT=5000
TV_URL=https://thetvapp.to
- To run the server:
node app.js
Upon starting, the server will fetch the necessary token and channel listings. Access the channel playlist via http://localhost:5000/channels.m3u
and individual HLS stream URLs by visiting http://localhost:5000/channel/{channelID}
.
If you are deploying this on a server using Docker, make sure to use a reverse proxy like Nginx, Apache, or Cloudflare tunnel to serve the stream over HTTPS or set the Docker network mode to host.
Contributions to TheTvApp StreamScraper are welcome! Feel free to fork, clone, or submit pull requests to enhance its features or performance.
This project is released under the MIT License - see the LICENSE.md file for details.
- A big thank you to the developers of Express, Axios, Puppeteer, Cheerio, and all other libraries that have contributed to this project.
- Inspired by the streaming community's need for more accessible and high-quality TV streaming solutions.
TheTvApp StreamScraper is not affiliated with
thetvapp.to
and is intended for educational and personal use only. Please respect the terms of service of the website and use this application responsibly.