[GH-ISSUE #1124] get 0 bytes file for youtube download with cookies #2140

Closed
opened 2026-04-11 06:35:20 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @shengchenyang on GitHub (Feb 22, 2025).
Original GitHub issue: https://github.com/imputnet/cobalt/issues/1124

problem description

I can use the bad reputation IP to get the download link normally with cookies.

But I get a 0 byte file when I download it.
It seems that the cookie does not take effect when downloading?

cookies.json example:

{
    "youtube": ["key1=value;key2=value2"]
}

your instance configuration

services:
    cobalt-api:
        image: ghcr.io/imputnet/cobalt:10.7.5

        init: true
        read_only: true
        restart: unless-stopped
        container_name: cobalt-api

        ports:
            - 9000:9000/tcp

        environment:
            API_URL: "http://127.0.0.1:9000/"
            COOKIE_PATH: "/cookies.json"
            API_EXTERNAL_PROXY: "http://127.0.0.1:7897"

        labels:
            - com.centurylinklabs.watchtower.scope=cobalt

        volumes:
            - ./cookies.json:/cookies.json

    watchtower:
        image: ghcr.io/containrrr/watchtower
        restart: unless-stopped
        command: --cleanup --scope cobalt --interval 900 --include-restarting
        volumes:
            - /var/run/docker.sock:/var/run/docker.sock
Originally created by @shengchenyang on GitHub (Feb 22, 2025). Original GitHub issue: https://github.com/imputnet/cobalt/issues/1124 ### problem description I can use the bad reputation IP to get the download link normally with cookies. But I get a 0 byte file when I download it. It seems that the cookie does not take effect when downloading? cookies.json example: ``` { "youtube": ["key1=value;key2=value2"] } ``` ### your instance configuration ```shell services: cobalt-api: image: ghcr.io/imputnet/cobalt:10.7.5 init: true read_only: true restart: unless-stopped container_name: cobalt-api ports: - 9000:9000/tcp environment: API_URL: "http://127.0.0.1:9000/" COOKIE_PATH: "/cookies.json" API_EXTERNAL_PROXY: "http://127.0.0.1:7897" labels: - com.centurylinklabs.watchtower.scope=cobalt volumes: - ./cookies.json:/cookies.json watchtower: image: ghcr.io/containrrr/watchtower restart: unless-stopped command: --cleanup --scope cobalt --interval 900 --include-restarting volumes: - /var/run/docker.sock:/var/run/docker.sock ```
GiteaMirror added the instance hosting help label 2026-04-11 06:35:20 -05:00
Author
Owner

@hextor1 commented on GitHub (Feb 23, 2025):

How you find cookies? and do not use both cookies and api external proxies use only cookies. then check ? @shengchenyang

<!-- gh-comment-id:2676762385 --> @hextor1 commented on GitHub (Feb 23, 2025): How you find cookies? and do not use both cookies and api external proxies use only cookies. then check ? @shengchenyang
Author
Owner

@dumbmoron commented on GitHub (Feb 23, 2025):

this should be resolved by 187b1f8f05

<!-- gh-comment-id:2676762970 --> @dumbmoron commented on GitHub (Feb 23, 2025): this should be resolved by 187b1f8f0593f3436d5533a60ee0fa23538174aa
Author
Owner

@hextor1 commented on GitHub (Feb 23, 2025):

this should be resolved by 187b1f8

Please can you tell me how to find cookies in personal account? @dumbmoron

<!-- gh-comment-id:2676764598 --> @hextor1 commented on GitHub (Feb 23, 2025): > this should be resolved by [187b1f8](https://github.com/imputnet/cobalt/commit/187b1f8f0593f3436d5533a60ee0fa23538174aa) Please can you tell me how to find cookies in personal account? @dumbmoron
Author
Owner

@hextor1 commented on GitHub (Feb 24, 2025):

this should be resolved by 187b1f8

Its still getting 0 byte file downlaod

<!-- gh-comment-id:2677861432 --> @hextor1 commented on GitHub (Feb 24, 2025): > this should be resolved by [187b1f8](https://github.com/imputnet/cobalt/commit/187b1f8f0593f3436d5533a60ee0fa23538174aa) Its still getting 0 byte file downlaod
Sign in to join this conversation.