Git Product home page Git Product logo

vidsrc-streamer's Introduction

VidSrc Streamer

Overview

VidSrc Streamer is a Python application designed to simplify the process of fetching direct stream URLs for movies based on IMDb IDs from the VidSrc website. Additionally, it offers a convenient script for generating IPTV playlists, compatible with IPTV players, VLC, and other similar media players.

Components

This project comprises two primary components:

  1. m3u8parser.py: This script acts as the core streaming component. Users can access it through a web API to retrieve direct stream URLs for movies and series. To stream content, simply use the following URL format:

    http://localhost:8000/stream/<imdb_id>
    

    Replace <imdb_id> with the IMDb ID of the movie you wish to stream on VLC Player. The script also supports caching links in an SQLite3 database for quicker retrieval.

  2. playlistcreator.py: This script facilitates the creation of IPTV playlists (playlist.m3u8 files) containing movie details. These playlists can be seamlessly utilized with IPTV players or VLC Player. To generate a playlist, follow these steps:

    • Create a file named imdb_id.txt containing one IMDb or TMDB ID per line.

    • Execute the script using Python:

      python playlistcreator.py

    The script will generate a playlist.m3u8 file with movie details and URLs that are compatible with IPTV players.

Getting Started

  1. Clone the repository to your local machine:

    git clone https://github.com/habitual69/VidSrc-Streamer.git
  2. Navigate to the project directory:

    cd VidSrc-Streamer
  3. Install the required Python libraries:

    pip install -r requirements.txt

Using m3u8parser.py

To stream a movie using VLC Player, use the following URL format:

http://localhost:8000/stream/<imdb_id>

Replace <imdb_id> with the IMDb ID of the movie you want to stream. The script will fetch the direct stream URL from the VidSrc website.

Using playlistcreator.py

To generate an IPTV playlist (playlist.m3u8) with movie details for use with IPTV players:

  1. Create a file named imdb_id.txt in the project directory. Each line should contain one IMDb or TMDB ID for the movies or series you want to include in the playlist.

    Example imdb_id.txt contents:

    tt0111161
    tt0068646
    tt0468569
    tt0071562
    
  2. Run the script:

    python playlistcreator.py

    The script will create a playlist.m3u8 file with movie details and URLs that can be used with IPTV players.

Docker Support

To run VidSrc Streamer in a Docker container, follow these steps:

  1. Build the Docker image:

    docker build -t vidsrc-streamer .
  2. Create a Docker container from the image:

    docker run -d -p 8000:8000 vidsrc-streamer

Now, you can access VidSrc Streamer at http://localhost:8000/stream/<imdb_id>.

Sample IPTV Playlist

A sample IPTV playlist (playlist.m3u8) is included, containing movie details for your reference.

License

This project is licensed under the MIT License. Please refer to the LICENSE file for further details.

vidsrc-streamer's People

Contributors

habitual69 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vidsrc-streamer's Issues

M3u8 file

M3u8 file not working ... This script it's stell working?

Feature request

Firstly, congratulations on the work.

I would like to request a feature. Is it possible to return m3u8 in the url? I would like to use your API on my movie website

vidsrc_extractor.py not working ?!

I ran the vidsrc_extractor.py in Google Colab notebook. After entering the ImDB ID, it shows as.

Input TMDB code for the movie: tt0111161
Requesting https://vidsrc.me/embed/movie?imdb=tt0111161
No source found for multiembed, available sources: VidSrc PRO, 2Embed, Superembed, VidSrc Hydrax
Stream: None
Subtitle: None

It shows stream is not found but if I click the above "Requesting ...." link, I able to see the video there.

If I change the source to anything in available sources, then I get

Input TMDB/ImDB code for the movie: tt0111161
Requesting https://vidsrc.me/embed/movie?imdb=tt0111161...
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-12-3101504e2225>](https://localhost:8080/#) in <cell line: 194>()
    195     vse = VidSrcExtractor()
    196     code = input("Input TMDB/ImDB code for the movie: ")
--> 197     stream, subtitle = vse.get_vidsrc_stream("VidSrc PRO", "movie", code, "eng")
    198     print(f"Stream: {stream}")
    199     print(f"Subtitle: {subtitle}")

[<ipython-input-12-3101504e2225>](https://localhost:8080/#) in get_vidsrc_stream(self, name, media_type, code, language, season, episode)
    169         soup = BeautifulSoup(req_1.text, "html.parser")
    170 
--> 171         encoded = soup.find("div", {"id": "hidden"}).get("data-h")
    172         seed = soup.find("body").get("data-i")
    173 

AttributeError: 'NoneType' object has no attribute 'get'

I tried with many movies imdb ids. Same issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.