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

niconico - WARNING: unable to log in: bad username or password #16391

Open
ghost opened this issue May 6, 2018 · 1 comment
Open

niconico - WARNING: unable to log in: bad username or password #16391

ghost opened this issue May 6, 2018 · 1 comment

Comments

@ghost
Copy link

@ghost ghost commented May 6, 2018

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.05.01. 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 2018.05.01

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

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

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 the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), 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 -v -n http://www.nicovideo.jp/watch/sm9913701
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-n', 'http://www.nicovideo.jp/watch/sm9913701']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.05.01
[debug] Python version 3.6.5 (CPython) - Linux-4.16.5-1-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg 3.4.2, ffprobe 3.4.2, rtmpdump 2.4
[debug] Proxy map: {}
[niconico] Logging in
WARNING: unable to log in: bad username or password
[niconico] sm9913701: Downloading webpage
[niconico] sm9913701: Downloading JSON metadata for h264_500kbps_360p-aac_64kbps
[niconico] sm9913701: Downloading JSON metadata for h264_300kbps_360p-aac_64kbps
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'http://pb03.dmc.nico:2808/vod/ht2_nicovideo/nicovideo-sm9913701_a9c5e12be6a0d8a74b5ec45aa77edcb143fff7afbd813c17642781f36f99373c?ht2_nicovideo=6-6ITVjm3P0M_1525621368193.cx19m6_p8bczh_3oj3ikkqbmexh'
[download] Destination: 「断罪ヤマザナドゥ!」に絵を付けてみた-sm9913701.mp4
[download]  88.9% of 16.56MiB at 140.65KiB/s ETA 00:13[download] Got server HTTP error: [Errno 104] Connection reset by peer. Retrying (attempt 1 of 10)...
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 1900, in process_info
    success = dl(filename, info_dict)
  File "/usr/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 1839, in dl
    return fd.download(name, info)
  File "/usr/lib/python3.6/site-packages/youtube_dl/downloader/common.py", line 365, in download
    return self.real_download(filename, info_dict)
  File "/usr/lib/python3.6/site-packages/youtube_dl/downloader/http.py", line 340, in real_download
    establish_connection()
  File "/usr/lib/python3.6/site-packages/youtube_dl/downloader/http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "/usr/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 2203, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden


Description of your issue, suggested solution and other information

This is what happens when I download this video: it starts downloading at non capped speed, then it caps speed down to 80/160 kb/s and when it's almost compelted (88-89%) a 403 error happens and download fails. As you can see it also warns me that my username or password are wrong but I used them to login so this can't be possible. I also recently changed email and password, maybe that's the issue. Speaking of the 403 type error, it happened before I changed email and password as well but at the time I was using jdownloader for the job. My username and passwords are stored correctly in my .netrc in $HOME with the proper credentials..

@trejkaz
Copy link

@trejkaz trejkaz commented May 8, 2018

I get this 403 a lot too, and it's always with larger files. youtube-dl retries a few times, but I had a few where it seemed like it wasn't getting very much for each retry. But when I waited a minute and ran it again, that worked fine. So it's maybe like there should be some kind of back-off period for nicovideo to avoid them booting the client if it retries immediately.

Also if you retry rapidly enough with nicovideo, the server will eventually give you a 503 for a while, even for videos which would have otherwise worked. I found out of my run of 200 or so videos, about 50 of them failed with 503 on the first run, then about 15 on the second run, and then on the third run everything was fine again.

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
1 participant
You can’t perform that action at this time.