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

youtube-dl not picking up .netrc upon 401 auth error #11992

Closed
ryenus opened this issue Feb 6, 2017 · 1 comment
Closed

youtube-dl not picking up .netrc upon 401 auth error #11992

ryenus opened this issue Feb 6, 2017 · 1 comment

Comments

@ryenus
Copy link

@ryenus ryenus commented Feb 6, 2017

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.02.04.1. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.02.04.1

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

$ youtube-dl --verbose -n <target_url>
[debug] System config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'-n', u'<target_url>']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.02.04.1
[debug] Python version 2.7.10 - Darwin-16.4.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.2.2, ffprobe 3.2.2
[generic] 8c39dca2866910148073b1b86eeec916: Requesting header
WARNING: Could not send HEAD request to <target_url>: HTTP Error 401: Unauthorized
[generic] 8c39dca2866910148073b1b86eeec916: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 416, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2006, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)

...
<end of log>

Description of your issue, suggested solution and other information

I've setup ~/.netrc and have it works fine with wget, but not sure why it doesn't work with youtube-dl, it seems youtube-dl fails immediately upon the 401 auth error, without even picking up my .netrc file, even though I've specified the -n option. If I use -u option to provide the username then type in my password interactively, it just works.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Feb 6, 2017

Login functionality is not applicable for unsupported websites. For further discussion please paste real URLs.

@yan12125 yan12125 closed this Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.