tv
Posted: 13 Dec 2019 20:18
Any testers out there for my iptv channel grabber program? Or how to fix it up. First batch program.
you need VLC
:start
cls
@ECHO ******** FIND MY STREAM ********
@ECHO OFF >NUL
@echo off
::SETLOCAL DisableDelayedExpansion
:FOR /F "usebackq delims=" %%a in (`"findstr /n ^^ C:\Users\laptop\Desktop\us.txt"`) do (
:: set "var=%%a"
:: SETLOCAL EnableDelayedExpansion
:: set "var=!var:*:=!"
:: echo(!var!
:: ENDLOCAL
::)
ECHO Type in a TV channel.
ECHO -------------------------------------------------------
ECHO ENTER CHANNEL TO SEARCH
set "input1="
set /p"input1="
SETLOCAL EnableExtensions EnableDelayedExpansion
set "chromepath=c:\Program Files (x86)\Google\Chrome\Application" path to chrome
set "site=http://visearch.net/iptv/web"
set "site2=https://iptvextreme.eu/"
set "engine=?q"
start "" !site!/!engine!=!input1!"
setlocal enableExtensions enableDelayedExpansion
:: uri encoded input of form: http://name.com:8080/<username>/<password>/30356
:pass
set "input="
ECHO ---------------------------
ECHO Outputs that have .m3u8 extenstions will be rejected.
ECHO If this happens select a new channel from web page then paste.
ECHO Paste from Website channel URL
set /p "input="
if not "x%input:u8=%" == "x%input%" goto :pass
:main
echo Options;
echo 1 : View channel on VLC
echo 2 : Full account channel list -download list-
echo 3 : Check account status
echo 4 : Add to playlist
echo 5 : If stream fails .Paste new channel
echo 6 : If you want a new channel select this option to Enter Another channel
:: Prompt for input,
set /p "strMenu=Enter desired number:"
:: Compare input through if commands,
:: `if not defined strMenu goto :menu` can be used here if prefered.
echo %strMenu%
if "%strMenu%" equ "1" goto vlc
if "%strMenu%" equ "2" goto CL
if "%strMenu%" equ "3" goto CS
if "%strMenu%" equ "4" goto ML
if "%strMenu%" equ "5" goto pass
if "%strMenu%" equ "6" goto start
pause
::Set "LogFile=C:\Users\laptop\Desktop\test.txt"
:vlc
start "" "C:\Program Files\VideoLAN\VLC\vlc.exe" !input! :sout=#display :sout-all :sout-keep
goto main
:CL
:: variables of form
:: "%%~a" = "http:"
:: "%%~b" = "name.com:8080"
:: "%%~c" = "<username>"
:: "%%~d" = "<password>"
:: "%%~e" = "30356"
:: output of form http://name.com:8080/get.php?username=< ... .&type=m3u
set "output="
for /f "tokens=1-5 delims=/" %%a in ("!input!") do (
set "output=%%~a//%%~b/get.php?username=%%~c&password=%%~d&type=m3u"
)
start "" !output!
goto main
:ML
echo #EXTINF:-1, %input1%>> TV.M3U
echo %input%>> TV.M3U
goto main
:CS
Echo Web page opens go to bottom of page and paste in last field.
pause
@echo off
et "output="
for /f "tokens=1-5 delims=/" %%a in ("!input!") do (
set "output=%%~a//%%~b/get.php?username=%%~c&password=%%~d&type=m3u"
)
echo(!output!
@(
cmd /E:ON /V:ON /cecho(!output!
)|clip
@echo off
start "" !site2!
cls
goto main
echo off
goto :eof
you need VLC
:start
cls
@ECHO ******** FIND MY STREAM ********
@ECHO OFF >NUL
@echo off
::SETLOCAL DisableDelayedExpansion
:FOR /F "usebackq delims=" %%a in (`"findstr /n ^^ C:\Users\laptop\Desktop\us.txt"`) do (
:: set "var=%%a"
:: SETLOCAL EnableDelayedExpansion
:: set "var=!var:*:=!"
:: echo(!var!
:: ENDLOCAL
::)
ECHO Type in a TV channel.
ECHO -------------------------------------------------------
ECHO ENTER CHANNEL TO SEARCH
set "input1="
set /p"input1="
SETLOCAL EnableExtensions EnableDelayedExpansion
set "chromepath=c:\Program Files (x86)\Google\Chrome\Application" path to chrome
set "site=http://visearch.net/iptv/web"
set "site2=https://iptvextreme.eu/"
set "engine=?q"
start "" !site!/!engine!=!input1!"
setlocal enableExtensions enableDelayedExpansion
:: uri encoded input of form: http://name.com:8080/<username>/<password>/30356
:pass
set "input="
ECHO ---------------------------
ECHO Outputs that have .m3u8 extenstions will be rejected.
ECHO If this happens select a new channel from web page then paste.
ECHO Paste from Website channel URL
set /p "input="
if not "x%input:u8=%" == "x%input%" goto :pass
:main
echo Options;
echo 1 : View channel on VLC
echo 2 : Full account channel list -download list-
echo 3 : Check account status
echo 4 : Add to playlist
echo 5 : If stream fails .Paste new channel
echo 6 : If you want a new channel select this option to Enter Another channel
:: Prompt for input,
set /p "strMenu=Enter desired number:"
:: Compare input through if commands,
:: `if not defined strMenu goto :menu` can be used here if prefered.
echo %strMenu%
if "%strMenu%" equ "1" goto vlc
if "%strMenu%" equ "2" goto CL
if "%strMenu%" equ "3" goto CS
if "%strMenu%" equ "4" goto ML
if "%strMenu%" equ "5" goto pass
if "%strMenu%" equ "6" goto start
pause
::Set "LogFile=C:\Users\laptop\Desktop\test.txt"
:vlc
start "" "C:\Program Files\VideoLAN\VLC\vlc.exe" !input! :sout=#display :sout-all :sout-keep
goto main
:CL
:: variables of form
:: "%%~a" = "http:"
:: "%%~b" = "name.com:8080"
:: "%%~c" = "<username>"
:: "%%~d" = "<password>"
:: "%%~e" = "30356"
:: output of form http://name.com:8080/get.php?username=< ... .&type=m3u
set "output="
for /f "tokens=1-5 delims=/" %%a in ("!input!") do (
set "output=%%~a//%%~b/get.php?username=%%~c&password=%%~d&type=m3u"
)
start "" !output!
goto main
:ML
echo #EXTINF:-1, %input1%>> TV.M3U
echo %input%>> TV.M3U
goto main
:CS
Echo Web page opens go to bottom of page and paste in last field.
pause
@echo off
et "output="
for /f "tokens=1-5 delims=/" %%a in ("!input!") do (
set "output=%%~a//%%~b/get.php?username=%%~c&password=%%~d&type=m3u"
)
echo(!output!
@(
cmd /E:ON /V:ON /cecho(!output!
)|clip
@echo off
start "" !site2!
cls
goto main
echo off
goto :eof