Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It doesn't work anymore, You tube has updated #135

Open
alex21 opened this issue Dec 27, 2024 · 7 comments
Open

It doesn't work anymore, You tube has updated #135

alex21 opened this issue Dec 27, 2024 · 7 comments

Comments

@alex21
Copy link

alex21 commented Dec 27, 2024

I noticed that it stopped working a few days ago.
Some other add-ons I used also stopped working.
I assume there were changes made by YouTube.

Can you provide a new updated fix?
I really like your project!
Thanks!

@purplescorpion1
Copy link

You can use my version that uses streamlink to pull into m3u
https://github.com/purplescorpion1/youtube-to-m3u

@alex21
Copy link
Author

alex21 commented Dec 30, 2024

You can use my version that uses streamlink to pull into m3u https://github.com/purplescorpion1/youtube-to-m3u

Thanks, I tried it and it works. But I need a more powerful server to use this, because I need it to run in the background.
Moose works differently. The script finds youtube m3u8 file and opens it easily without background process.

@purplescorpion1
Copy link

You can use my version that uses streamlink to pull into m3u https://github.com/purplescorpion1/youtube-to-m3u

Thanks, I tried it and it works. But I need a more powerful server to use this, because I need it to run in the background. Moose works differently. The script finds youtube m3u8 file and opens it easily without background process.

I've added a non flask server version - obviously the stream links will expire and the script will need running every few hours

So you now have the choice between the flask version which will automatically get the latest stream link when the youtube url is requested or the non flask version which will pull the m3u8 into the m3u but will expire and will need the script to be manually run (or via cron job) every few hours

@alex21
Copy link
Author

alex21 commented Dec 30, 2024

You can use my version that uses streamlink to pull into m3u https://github.com/purplescorpion1/youtube-to-m3u

Thanks, I tried it and it works. But I need a more powerful server to use this, because I need it to run in the background. Moose works differently. The script finds youtube m3u8 file and opens it easily without background process.

I've added a non flask server version - obviously the stream links will expire and the script will need running every few hours

So you now have the choice between the flask version which will automatically get the latest stream link when the youtube url is requested or the non flask version which will pull the m3u8 into the m3u but will expire and will need the script to be manually run (or via cron job) every few hours

Nice work! I tested it, and it works locally on Windows.
However, when I run the same script on the server, the extracted M3U playlist doesn't play.

When I execute youtube-non-server.py on the server, it generates an M3U file with stream links, but I can't open it. There are no errors—everything runs smoothly—but the file just won’t open. I'm still not sure why.

For context, I'm using Python 3.11 and Streamlink 5.2.1 on a Raspberry Pi 3. Unfortunately, there is no newer version of Streamlink available for the Raspberry Pi. On Windows, I'm using Streamlink 7.0.0.

Do you have any suggestions on what I could try?

@purplescorpion1
Copy link

purplescorpion1 commented Dec 30, 2024

You can use my version that uses streamlink to pull into m3u https://github.com/purplescorpion1/youtube-to-m3u

Thanks, I tried it and it works. But I need a more powerful server to use this, because I need it to run in the background. Moose works differently. The script finds youtube m3u8 file and opens it easily without background process.

I've added a non flask server version - obviously the stream links will expire and the script will need running every few hours
So you now have the choice between the flask version which will automatically get the latest stream link when the youtube url is requested or the non flask version which will pull the m3u8 into the m3u but will expire and will need the script to be manually run (or via cron job) every few hours

Nice work! I tested it, and it works locally on Windows. However, when I run the same script on the server, the extracted M3U playlist doesn't play.

When I execute youtube-non-server.py on the server, it generates an M3U file with stream links, but I can't open it. There are no errors—everything runs smoothly—but the file just won’t open. I'm still not sure why.

For context, I'm using Python 3.11 and Streamlink 5.2.1 on a Raspberry Pi 3. Unfortunately, there is no newer version of Streamlink available for the Raspberry Pi. On Windows, I'm using Streamlink 7.0.0.

Do you have any suggestions on what I could try?

I'm guessing its an out of date streamlink

The stream links it pulls will only work on the same public IP as the machine that created the m3u
e.g if it was created on machine x it will only work on machine x and not machine y if machine y has a different public ip
(You can get around this by using a proxy like threadfin and restream it)

Try doing the following to install the latest version of streamlink

sudo apt update
sudo apt upgrade

pip3 install --user streamlink

Then add the local bin directory to your PATH

Open

~/.bashrc

add

export PATH="$HOME/.local/bin:$PATH"

If it doesn't already exist

Then do

source ~/.bashrc

If it successfully updated doing

streamlink --version

should give version 7.1.1

@purplescorpion1
Copy link

purplescorpion1 commented Dec 30, 2024

@alex21 can you try the script youtube_non_stream_link.py in my youtube github repo. It doesn't require streamlink as I've put the logic for it in the script. Works in the same way the non-server version does.

advantage - doesn't require streamlink
disadvantage - if anything changes youtube side you will have to update the script with new logic instead of just updating streamlink

Same rules apply - It will only work on the same public ip as the machine that generates the m3u
So if testing on server install vlc on it and open it in that on the server if your other machines have a different public ip

also needs the request module
pip install requests

@alex21
Copy link
Author

alex21 commented Dec 31, 2024

It will only work on the same public ip as the machine that generates the m3u

Ok, I didn't know that. I will figure out what to do. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants