J2897

Twitch Chat Downloader Interface

Aug 18th, 2019 (edited)
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.42 KB | None | 0 0
  1. @echo OFF
  2. cls
  3. color 1b
  4. title Twitch Chat Downloader Interface
  5. setlocal EnableDelayedExpansion
  6.  
  7. REM This is for easily grabbing the Twitch Chat from VODs using TCD...
  8. :: https://github.com/PetterKraabol/Twitch-Chat-Downloader
  9.  
  10. REM Update this file to fix the errors...
  11. :: C:\Users\J2897\Code\Python\tcd\venv\Lib\site-packages\twitch\v5\resources\comments.py
  12. :: https://pastebin.com/Hu68ir44
  13.  
  14. REM Activate the virtual environment.
  15. set "VENV=%USERPROFILE%\Code\Python\tcd\venv"
  16. if exist "%VENV%" call "%VENV%\Scripts\activate.bat"
  17.  
  18. REM Make sure TCD is already installed.
  19. tcd --version || echo You need the TCD utility... && echo https://github.com/PetterKraabol/Twitch-Chat-Downloader && goto :End
  20. pause
  21.  
  22. REM Set the main variables.
  23. set "TAB=   "
  24.  
  25. :Start
  26. cls
  27. set /P "CHANNEL=Streamer name:%TAB%"
  28. set /P "VODs=Number of VODs:%TAB%"
  29. set "OUTPUT_DIR=%USERPROFILE%\Desktop\Twitch Chat\%CHANNEL%"
  30.  
  31. REM If we want just one VOD, get the VID number.
  32. if %VODs% EQU 1 (
  33.     choice /c YN /m "Is it the most recent chat?"
  34.     if errorlevel 2 (
  35.         REM Download a specific VOD.
  36.         set /P "VID=Video ID:%TAB%"
  37.         tcd --video !VID! --format irc --output "%OUTPUT_DIR%"
  38.         goto :End
  39.     )
  40. )
  41.  
  42. REM Download the requested number of VODs.
  43. tcd --channel %CHANNEL% --format irc --first=%VODs% --output "%OUTPUT_DIR%"
  44. goto :Start
  45.  
  46. :End
  47. endlocal
  48. pause
  49.  
  50. REM Deactivate the virtual environment.
  51. if exist "%VENV%" call "%VENV%\Scripts\deactivate.bat"
Add Comment
Please, Sign In to add comment