Giter Site home page Giter Site logo

Comments (3)

xythas3217 avatar xythas3217 commented on May 30, 2024 1

I resolved the issue while trying to make a reproducible test!

I was making two different requests to youtube-dl, and the first one wasnt passing in cookies, only the second.

from youtube-dl-exec.

Kikobeats avatar Kikobeats commented on May 30, 2024

Hello,

Thanks for reporting. The command looks legit.

Unfortunately, I need a reproducible test for helping you, since that is a feature I'm not using.

What if you try to provide cookies as a header? from CLI docs, using --add-header FIELD:VALUE

from youtube-dl-exec.

Laljaka avatar Laljaka commented on May 30, 2024

I am having the same problem.
Nor cookies.txt, nor passing the header works.

Here is a relevant part of my code:

const process = ytdl.raw(
        string,
        {
                o: '-',
                // q: '',
                v: '',
                f: 'bestaudio[ext=webm+acodec=opus+asr=48000]/bestaudio',
                r: '100K',
                addHeader: 'LOGIN_INFO:AFmmF2swRAIgIbuQIwapdUbTUZ3MUJlM05aV0QzRDdxS3QxM2NZ',
        },
                { stdio: ['ignore', 'pipe', 'pipe'] },
        );
process.stderr.pipe(fs.createWriteStream('stderr.txt'));
const stream = process.stdout;

and here is an error from youtube-dl:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.youtube.com/watch?v=7Do70nztRNE', '-o', '-', '-v', '-f', 'bestaudio[ext=webm+acodec=opus+asr=48000]/bestaudio', '-r', '100K', '--add-header', 'LOGIN_INFO:AFmmF2swRAIgIbuQIwapdUbTUZ3MUJlM05aV0QzRDdxS3QxM2NZ']
[debug] Adding header from command line option LOGIN_INFO:AFmmF2swRAIgIbuQIwapdUbTUZ3MUJlM05aV0QzRDdxS3QxM2NZ
[debug] Encodings: locale cp1251, fs mbcs, out cp1251, pref cp1251
[debug] youtube-dl version 2021.06.06
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] 7Do70nztRNE: Downloading webpage
[youtube] 7Do70nztRNE: Refetching age-gated info webpage
WARNING: unable to download video info webpage: HTTP Error 410: Gone
ERROR: Sign in to confirm your age
This video may be inappropriate for some users.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 815, in wrapper
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 836, in __extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\common.py", line 534, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\youtube.py", line 1713, in _real_extract
youtube_dl.utils.ExtractorError: Sign in to confirm your age
This video may be inappropriate for some users.

Header value is shortened here.

from youtube-dl-exec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.