YouTube OPML subscription archiver
Find a file
Viktor Varland 4dc4c380c4
All checks were successful
build / build (push) Successful in 1m52s
docs: readme update
2025-04-08 11:17:53 +02:00
.forgejo/workflows ci: master => main 2025-03-28 15:44:26 +01:00
internal feat: skip banner and fanart dls if exists 2025-04-08 08:51:43 +02:00
.gitignore feat: add more config options 2025-03-28 12:44:38 +01:00
Containerfile feat: support CONFIG env variable for file 2025-03-29 09:48:23 +01:00
go.mod feat: youtube channel archiver 2025-03-27 15:54:31 +01:00
go.sum feat: youtube channel archiver 2025-03-27 15:54:31 +01:00
main.go feat: generate metadata for shows and episodes 2025-04-04 13:24:06 +02:00
README.md docs: readme update 2025-04-08 11:17:53 +02:00
shell.nix feat: youtube channel archiver 2025-03-27 15:54:31 +01:00

subsyt

config

config.toml:

dry_run = true                          # set to `false` for real run
out_dir = "./vids"                      # path to archive vids

[provider]
[provider.youtube]
cmd = "./yt-dlp"                        # path to yt-dlp binary
quality = "res:1080"                    # set the preferred quality
output_path_template = ""               # yt-dlp output template
url = "https://www.youtube.com"         # full yt url
throttle = 1                            # throttle yt request
range = "1:5:1"                         # downloads videos in range 1-5: [START][:STOP][:STEP]
after_date = "20250326"                 # not in use
cookies = false                         # control use of cookies file
cookies_file = "./cookies.txt"          # pass user cookies to yt
opml_file = "./opml.xml"                # the opml file to use

subs-opml.xml:

<?xml version="1.0"?>
<opml version="1.1">
    <body>
        <outline ...>
            <outline .../>
            <outline .../>
            <outline .../>
        </outline>
        <outline ...>
            <outline .../>
            <outline .../>
            <outline .../>
        </outline>
    </body>
</opml>

build

CGO_ENABLED=0 go build

Cookies

Warning

Your account MAY be banned when using cookies !

E.g. from Chromium:

yt-dlp --cookies-from-browser chromium --cookies cookies.txt

Container

podman run --rm \
    --env='CONFIG=/data/config.toml' \
    --volume=path/to/config:/data/config.toml \
    --volume=path/to/opml:/data/opml.xml \
    --volume=path/to/cookies:/data/cookies.txt
    registry.meatbag.se/varl/subsyt

Result

.
├── Technology Connextras
│   ├── archive.txt
│   ├── fanart.jpg
│   ├── poster.jpg
│   ├── s2024
│   │   ├── Technology_Connextras.s2024e0611.Connextras_dishwasher_follow_up_the_sequel.0Kp3bjm55xw-1080p-thumb.jpg
│   │   ├── Technology_Connextras.s2024e0611.Connextras_dishwasher_follow_up_the_sequel.0Kp3bjm55xw-1080p.nfo
│   │   ├── Technology_Connextras.s2024e0611.Connextras_dishwasher_follow_up_the_sequel.0Kp3bjm55xw-1080p.webm
│   │   ├── Technology_Connextras.s2024e0712.Here_s_what_Numitron_tubes_in_an_actual_product_look_like.XgzL05Gojfw-1080p-thumb.jpg
│   │   ├── Technology_Connextras.s2024e0712.Here_s_what_Numitron_tubes_in_an_actual_product_look_like.XgzL05Gojfw-1080p.nfo
│   │   ├── Technology_Connextras.s2024e0712.Here_s_what_Numitron_tubes_in_an_actual_product_look_like.XgzL05Gojfw-1080p.webm
│   │   ├── Technology_Connextras.s2024e0909.Answering_your_pinball_questions_-_Williams_Aztec_Q_A.P3Y4d2aHnNE-1080p-thumb.jpg
│   │   ├── Technology_Connextras.s2024e0909.Answering_your_pinball_questions_-_Williams_Aztec_Q_A.P3Y4d2aHnNE-1080p.nfo
│   │   └── Technology_Connextras.s2024e0909.Answering_your_pinball_questions_-_Williams_Aztec_Q_A.P3Y4d2aHnNE-1080p.webm
│   ├── s2025
│   │   ├── Technology_Connextras.s2025e0330.Renewable_energy_means_we_can_stop_setting_money_on_fire_silly_billy.Y2qSaD1v4cQ-1080p-thumb.jpg
│   │   ├── Technology_Connextras.s2025e0330.Renewable_energy_means_we_can_stop_setting_money_on_fire_silly_billy.Y2qSaD1v4cQ-1080p.nfo
│   │   ├── Technology_Connextras.s2025e0330.Renewable_energy_means_we_can_stop_setting_money_on_fire_silly_billy.Y2qSaD1v4cQ-1080p.webm
│   │   ├── Technology_Connextras.s2025e0331.An_unplanned_trip_from_Chicago_to_Milwaukee_in_an_electric_car.3GUQdrpduo0-1080p-thumb.jpg
│   │   ├── Technology_Connextras.s2025e0331.An_unplanned_trip_from_Chicago_to_Milwaukee_in_an_electric_car.3GUQdrpduo0-1080p.nfo
│   │   └── Technology_Connextras.s2025e0331.An_unplanned_trip_from_Chicago_to_Milwaukee_in_an_electric_car.3GUQdrpduo0-1080p.webm
│   └── tvshow.nfo