Skip to content

Pulls the live stream of people you follow on twitch into an m3u

Notifications You must be signed in to change notification settings

purplescorpion1/twitch-to-m3u

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 

Repository files navigation

twitch-to-m3u

Pulls the live stream of twitch channels into an m3u

Choose method to run

Method 1 - Run the exe to install modules and automatically extract the m3u (credentials need entering first launch only)
Method 2 - Use the nodejs script

Method 1 Requirements

Nodejs https://nodejs.org/en
Download the exe from the releases section https://github.com/purplescorpion1/twitch-to-m3u/releases
Streamlink available at path https://streamlink.github.io/install.html

How to run

Note if you used a previous version you may have to rename config.ini to anything else so you can recreate it. You can copy and paste existing details from it into the cmd window when asked and then add anything additional

Run Twitch_Followed.exe
It will ask for the
User ID (Twitch username converted to ID)
Twitch OAuth
Access token
ClientID

See "How to setup"

Method 2 Requirements

Node.js https://nodejs.org/en
Streamlink available at path https://streamlink.github.io/install.html

How to install

git clone https://github.com/purplescorpion1/twitch-to-m3u.git

cd twitch-to-m3u

npm install puppeteer node-fetch ini readline-sync

How to run

node twitch_followed.js

It will ask for the
User ID (Twitch username converted to ID)
Twitch OAuth
Access token
ClientID

How to setup

Go to https://www.streamweasels.com/tools/convert-twitch-username-to-user-id/
Enter your twitch username
Convert twitch username to ID
Copy User ID (Twitch username converted to ID) to Twitch_Followed to cmd/terminal

Go to https://www.twitch.tv sign in and view a stream
Open the developer tools of web browser (cntrl + shift + I)
Go to the console

Type (you may have to type confirmation to enable pasting of code into console first)

document.cookie.split("; ").find(item=>item.startsWith("auth-token="))?.split("=")[1]

Copy the resulting string consisting of 30 alphanumerical characters without any quotations
Copy Twitch OAuth to Twitch_Followed to cmd/terminal

Go to https://twitchtokengenerator.com/
Under available token scopes set user:read:follows to Yes

Scroll down and click generate token - sign in/authorize twitch to use
Verify captcha

Under generated tokens
Copy Access Token to Twitch_Followed to cmd/terminal
Copy ClientID to Twitch_Followed to cmd/terminal

It will then output twitch_followed.m3u

Optional steps

Create a dummy EPG using a dummy EPG script e.g. from https://github.com/yurividal/dummyepgxml