GithubHelp home page GithubHelp logo

piptv's Introduction

PIPTV - A simple Python IPTV client with 82 channels including NFL Network, ESPN, FS1 & FS2

This is an incredibly simple module. With that being said, I provide this code and all support free of charge, so any donations are welcome and can be sent to this bitcoin address: bc1qahz93vyljhjj0fsadu2m8zdhaqdaf60gnc7y2y Thank you and enjoy!

Setup

These setup instructions assume you have vlc installed before setup. If you don't have it installed, you can find a download link here. Please make sure that the architecture of vlc (64bit/32bit) matches the architecture of your python installation! These instructions also assume you have python 3.x and pip installed. If you don't and you're using windows, go to python.org and install the latest version of python (which will have pip bundled with it) Make sure you choose to install for all users and to add python to your path (you will see the check boxes in the install dialog) For ubuntu and other Debian based Linux distros, open a terminal and type the following:

apt install python3

Once you have finished installing vlc, python and pip, the process is as simple as navigating to the directory that you downloaded/cloned piptv into, and typing the following in your terminal:

For Ubuntu/Debian

python3 -m pip install -r requirements.txt

For Windows

pip install -r requirements.txt

If you need a more detailed explanation for windows 10, see doc/windows.md in this repository

Use:

To run the script, navigate to the directory where you downloaded it and type the following:

For Ubuntu/Debian

python3 piptv.py

For Windows

python piptv.py

Upon running the script, you can type list to see the channel list, you can type the name as it appears in the channel list to tune to that channel, or you can type quit to quit. To stop an actively streaming channel, hit CTRL + C to stop the stream and return to the prompt.

Debugging

The option to pass a debug flag has been added, so if you're experiencing issues you can add --debug to the end of the channel name when attempting to tune, and you will see a very verbose debug output in the terminal. For example, when prompted to enter a command after running the script, instead of typing..

espn

to tune to espn, type

espn --debug

and you will see the additional debug output in the terminal!

Enjoy!

piptv's People

Contributors

baddles avatar jeddunk avatar schwifty42069 avatar teachingchain avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

piptv's Issues

Add reloltv.com as a source

Hello! I love this neat little project. I'm not sure where to put this feature request so I just leave it here:
it would be awesome if some more sources could be added to this script. After some quick Googling I found http://www.reloltv.com/playlist.txt. I haven't cross-referenced the individual streams yet, but there seem to be some new streams available by the looks of it.

Let me know if you need any development help; I'm a full-time Django developer myself!
cheers

no function error

i have been getting this every time after choosing the channel
i am using ubuntu 19. i just followed everything that provided here. sorry i am noob to this

trying to tune to tv land...

Traceback (most recent call last):

File "piptv.py", line 167, in

main()

File "piptv.py", line 163, in main

stb.tune_to_channel(command)

File "piptv.py", line 118, in tune_to_channel

self.player.set_mrl(hotlink)

File "/home/sujan/.local/lib/python3.7/site-packages/vlc.py", line 3331, in set_mrl

m = self.get_instance().media_new(mrl, *options)

File "/home/sujan/.local/lib/python3.7/site-packages/vlc.py", line 1908, in media_new

if ':' in mrl and mrl.index(':') > 1:

TypeError: argument of type 'NoneType' is not iterable

Problem in windows 10

python version: 3.7.3
Requirements.txt installed and up-to-date.

You warned windows users but just wanted to let you know about error

Error when you run script:

`PS C:\Users------\Desktop\piptv-master> python .\piptv.py
Traceback (most recent call last):
File ".\piptv.py", line 3, in
import vlc

File "C:\Users------\AppData\Local\Programs\Python\Python37\lib\site-packages\vlc.py", line 207, in
dll, plugin_path = find_lib()
File "C:\Users------\AppData\Local\Programs\Python\Python37\lib\site-packages\vlc.py", line 167, in find_lib
dll = ctypes.CDLL(libname)
File "C:\Users------\AppData\Local\Programs\Python\Python37\lib\ctypes_init_.py", line 356, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found`

OSError: [WinError 126] The specified module could not be found

Attempting to execute the code results in the following:

PS C:\> python piptv.py 
Traceback (most recent call last):   
    File "piptv.py", line 4, in <module>     
        import vlc   
    File "C:\Users\xxx_000\AppData\Local\Programs\Python\Python37\lib\site-packages\vlc.py", line 207, in <module>     
        dll, plugin_path  = find_lib()   
    File "C:\Users\xxx_000\AppData\Local\Programs\Python\Python37\lib\site-packages\vlc.py", line 167, in find_lib     
        dll = ctypes.CDLL(libname)   
       File "C:\Users\xxx_000\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 364, in __init__     
        self._handle = _dlopen(self._name, mode) 
OSError: [WinError 126] The specified module could not be found

The following has been attempted:

  1. Restart and attempting to go through the steps again
  2. Download Python from the official site 3. Move the .py file to different directories
  3. Download the file from https://github.com/schwifty42069/piptv/raw/master/piptv.py along with the original Github.
  4. Updated my Net Framework
  5. Updated VLC to the newest version

Win 10 issue Import VLC

After trying this

Prepare for a longer explanation, I will walk you through everything, if not stated otherwise commands should be ran in Powershell, as an admin.

First and foremost, download VLC and install it, if you don't already have it
Link: https://www.videolan.org/vlc/index.html
Edit: Make sure you download the 64-bit version (thank you for mentioning it u/Hairless_Human)

Next, we will need Python, the easiest way is through powershell with Chocolatey to install Chocolatey copy Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) into powershell and wait for it to be completed.

Next we will need Python itself, copy choco install -y python3 and wait for it to be completed, you may have to sign out & in out of Windows after this.

Now write python --version to make sure that it is actually installed (if not and you haven't already logged out and in, do it, it should fix it)

Now we will need the requirements, the crude way of getting them is with pip, copy these commands one-by-one and wait for them to be completed:
python -m pip install requests
python -m pip install beautifulsoup4
python -m pip install python_vlc

Now, if you don't already have the piptv.py file then you can do so by right-clicking on this link and choosing "Save link as..." save it to your desired location.

Now cd over to that location with Powershell, once you are in the folder do python piptv.py (or python yourfilename.py ) it should start the program, albeit with funky coloring codes, they should be fixed after tuning to a channel and stopping the playback
Edit: As noted by u/sortbycontroversial2 I didn't exactly mention what cd it means change directory so by cd over to the location I basically mean to note where you saved the python file and write cd "THEDIRECTORY WHERE IT IS" so if you saved it in your C: drive you would write cd C:\

On my Windows 10 and on an fresh Win10 WM the same error shows up. I´m using Python 3.8 and tried VLC 64 Bit 3.0.7, 3.0.8 and the Windows Store Version.

"IndexError: list index out of range" mac

Hi there:)

Thank you for creating the app. I tried using it. I installed all the requirements. Yet, I am getting this error. Is there something I am doing wrong or is it a bug? Thank you:)

>> espn

Trying to tune to espn...

Traceback (most recent call last):
  File "/Users/vnvy/Documents/socialamnesia/piptv/piptv.py", line 152, in <module>
    main()
  File "/Users/vnvy/Documents/socialamnesia/piptv/piptv.py", line 148, in main
    stb.tune_to_channel(command)
  File "/Users/vnvy/Documents/socialamnesia/piptv/piptv.py", line 109, in tune_to_channel
    hotlink = self.get_hls_hotlink(channel)
  File "/Users/vnvy/Documents/socialamnesia/piptv/piptv.py", line 103, in get_hls_hotlink
    return bsoup.findAll("script")[15].next_element.split(" file: ")[1].split(',')[0].strip("\'")
IndexError: list index out of range

Script not working on Ubuntu

Error code:

Trying to tune to abc...

Traceback (most recent call last):
File "piptv.py", line 181, in
main()
File "piptv.py", line 177, in main
stb.tune_to_channel(command)
File "piptv.py", line 127, in tune_to_channel
self.player.set_mrl(hotlink)
File "/home/chris/.local/lib/python3.7/site-packages/vlc.py", line 3331, in set_mrl
m = self.get_instance().media_new(mrl, *options)
File "/home/chris/.local/lib/python3.7/site-packages/vlc.py", line 1908, in media_new
if ':' in mrl and mrl.index(':') > 1:
TypeError: argument of type 'NoneType' is not iterable

WinError 126

I've installed the requirements, but on running the script, I get this error. Photo attached.
Error!

Stopped working today, anyone else?

Was working fine yesterday and earlier today, then it stopped working.
Here’s what I get when I try to tune in:

Trying to tune to tlc...

Traceback (most recent call last):
File "piptv.py", line 180, in
main()
File "piptv.py", line 176, in main
stb.tune_to_channel(command)
File "piptv.py", line 126, in tune_to_channel
self.player.set_mrl(hotlink)
File "/home/still/.local/lib/python3.5/site-packages/vlc.py", line 3331, in set_mrl
m = self.get_instance().media_new(mrl, *options)
File "/home/still/.local/lib/python3.5/site-packages/vlc.py", line 1908, in media_new
if ':' in mrl and mrl.index(':') > 1:
TypeError: argument of type 'NoneType' is not iterable

File Not Found

PS C:\Users\USER\Downloads\piptv-master> python piptv.py
Traceback (most recent call last):
File "C:\Users\USER\Downloads\piptv-master\piptv.py", line 3, in
import vlc
File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\site-packages\vlc.py", line 207, in
dll, plugin_path = find_lib()
File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\site-packages\vlc.py", line 170, in find_lib
dll = ctypes.CDLL(p)
File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\ctypes_init_.py", line 374, in init
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'libvlc.dll' (or one of its dependencies). Try using the full path with constructor syntax.

Cannot tune on MacOS (Catalina)

Whenever I try to tune to a channel I get this error:
">>" hbo

Trying to tune to hbo...

Traceback (most recent call last):
File "piptv.py", line 181, in
main()
File "piptv.py", line 177, in main
stb.tune_to_channel(command)
File "piptv.py", line 127, in tune_to_channel
self.player.set_mrl(hotlink)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/vlc.py", line 3331, in set_mrl
m = self.get_instance().media_new(mrl, *options)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/vlc.py", line 1908, in media_new
if ':' in mrl and mrl.index(':') > 1:
TypeError: argument of type 'NoneType' is not iterable

Do you know what the cause of this issue is? And on top of that do you know how to fix it?

error in ubuntu 16

after entering any channel name I got following error:
Traceback (most recent call last):
File "piptv.py", line 181, in
main()
File "piptv.py", line 174, in main
stb.tune_to_channel(command.split(" --debug")[0])
File "piptv.py", line 127, in tune_to_channel
self.player.set_mrl(hotlink)
File "/usr/local/lib/python3.5/dist-packages/vlc.py", line 3331, in set_mrl
m = self.get_instance().media_new(mrl, *options)
File "/usr/local/lib/python3.5/dist-packages/vlc.py", line 1908, in media_new
if ':' in mrl and mrl.index(':') > 1:
TypeError: argument of type 'NoneType' is not iterable

everything looks right?

https://i.imgur.com/Eu1fjMj.png

I then paste

pip install -r requirements.txt

https://i.imgur.com/gN6GuVY.png is what i get

NOW.. when I drag the requirements.txt file into the shell...

https://i.imgur.com/eF2ZA4y.png

ok... ive tried pasting both of the commands.. and also tried draging both of the .txt and .py file into the shell.. nothing.. I dragged it from my download directory.. and i copied the files to 'open file location' for my python 64.. i re installed.. allowing PATH and installing for all users..

I am at a loss for what I can try next.. TY

Could not find module 'libvlc.dll'

File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\ctypes_init_.py", line 374, in init
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'libvlc.dll' (or one of its dependencies). Try using the full path with constructor syntax.

error in tuning to a channel

Trying to tune to vh1...

Traceback (most recent call last):
  File "piptv.py", line 181, in <module>
    main()
  File "piptv.py", line 177, in main
    stb.tune_to_channel(command)
  File "piptv.py", line 127, in tune_to_channel
    self.player.set_mrl(hotlink)
  File "/Users/n361268/miniconda3/envs/piptv/lib/python3.8/site-packages/vlc.py", line 3331, in set_mrl
    m = self.get_instance().media_new(mrl, *options)
  File "/Users/n361268/miniconda3/envs/piptv/lib/python3.8/site-packages/vlc.py", line 1908, in media_new
    if ':' in mrl and mrl.index(':') > 1:
TypeError: argument of type 'NoneType' is not iterable

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.