cross-posted from: https://discuss.tchncs.de/post/22423685

EDIT: For those who are too lazy to click the link, this is what it says

Hello,

Sad news for everyone. YouTube/Google has patched the latest workaround that we had in order to restore the video playback functionality.

Right now we have no other solutions/fixes. You may be able to get Invidious working on residential IP addresses (like at home) but on datacenter IP addresses Invidious won’t work anymore.

If you are interested to install Invidious at home, we remind you that we have a guide for that here: https://docs.invidious.io/installation/..

This is not the death of this project. We will still try to find new solutions, but this might take time, months probably.

I have updated the public instance list in order to reflect on the working public instances: https://instances.invidious.io. Please don’t abuse them since the number is really low.

Feel free to discuss this politely on Matrix or IRC.

You are viewing a single thread.
View all comments View context
20 points

Time to pirate YT content and upload to usenet to be automatically downloaded using sonarr

permalink
report
parent
reply
8 points

Yes but literally throwing together a script to download the days subscription videos to a jellyfin media drive would be stupidly simple.

permalink
report
parent
reply
5 points

Sure, but not as convenient 🤷🏻

permalink
report
parent
reply
3 points

“Stupidly simple” might be overselling it when it comes to the masses adopting it. Not everyone is adept at “throwing together a script.”

That being said, I’m all for helping the masses adapt.

permalink
report
parent
reply
4 points

“Give me a Python script using yt-dlp that I can run on a cronjob that will download the videos from any of my subscribed channels since the last time the script was run”

You can use the following Python script to download videos from your subscribed channels since the last run. This script uses yt-dlp and stores the last download timestamp to track new videos.

First, ensure you have yt-dlp installed:

pip install yt-dlp

Then, create a script called download_videos.py:

import os
import json
import subprocess
from datetime import datetime

# Configuration
last_run_file = 'last_run.json'
download_directory = 'downloads'

# Ensure the download directory exists
os.makedirs(download_directory, exist_ok=True)

# Load the last run time
if os.path.exists(last_run_file):
    with open(last_run_file, 'r') as f:
        last_run = json.load(f)['last_run']
else:
    last_run = datetime.now().isoformat()

# Update the last run time to now
current_run = datetime.now().isoformat()

# Command to get videos from subscribed channels since the last run
command = [
    'yt-dlp',
    '--download-archive', 'archive.txt',
    '--output', f'{download_directory}/%(title)s.%(ext)s',
    '--date-after', last_run,
    '--no-post-overwrites',
    '--merge-output-format', 'mp4',
    'https://www.youtube.com/channel/CHANNEL_ID',  # Replace with your channel URL
]

# Run the command
subprocess.run(command)

# Save the current run time
with open(last_run_file, 'w') as f:
    json.dump({'last_run': current_run}, f)

print("Download complete. Next run will check for videos since:", current_run)

Setting Up the Cron Job

  1. Make the script executable:

    chmod +x download_videos.py
    
  2. Open your crontab:

    crontab -e
    
  3. Add a line to run the script at your desired interval (e.g., daily at 2 AM):

    0 2 * * * /path/to/python /path/to/download_videos.py
    

Notes

  • Replace CHANNEL_ID in the script with your actual channel IDs or use a playlist URL if preferred.
  • The archive.txt file keeps track of already downloaded videos to avoid duplicates.
  • Adjust the paths to Python and your script as needed.
permalink
report
parent
reply
4 points
*

It already exists, even as a Docker. Not as simple as an *arr style interface, but it works great one you set it up.

ytdl-sub

permalink
report
parent
reply
2 points

Well you know what they say “Great minds think quicker than mine and probably have already had that thought.”

permalink
report
parent
reply
7 points

Honestly, it would probably be easier to just build a *arr program specifically for downloading YouTube videos directly. Tie it into the rest of the *arr suite, with naming conventions for Plex/Jellyfin.

permalink
report
parent
reply
1 point

I would install that, but I fear scraping youtube will be a arms race, soon, similar to other streaming services

permalink
report
parent
reply

Technology

!technology@lemmy.world

Create post

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


Community stats

  • 15K

    Monthly active users

  • 6.7K

    Posts

  • 154K

    Comments