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

[nicovideo.jp] HTTP 403 when downloading some (but not all) "My Lists" #13706

Closed
UserNaem opened this issue Jul 22, 2017 · 1 comment
Closed

[nicovideo.jp] HTTP 403 when downloading some (but not all) "My Lists" #13706

UserNaem opened this issue Jul 22, 2017 · 1 comment

Comments

@UserNaem
Copy link

@UserNaem UserNaem commented Jul 22, 2017

  • I've verified and I assure that I'm running youtube-dl 2017.07.23
  • 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)
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\user>youtube-dl -v http://www.nicovideo.jp/mylist/6280579
[debug] System config: []
[debug] User config: ['--console-title', '--add-metadata', '-f', '303+251/302+25
1/299+140/bestvideo+bestaudio/best[ext=webm]/best', '-o', 'H:/v/youtube-dl/%(tit
le)s-%(id)s.%(ext)s', '--cookies', 'H:\\v\\youtube-dl\\cookies.txt']
[debug] Custom config: []
[debug] Command-line args: ['-v', 'http://www.nicovideo.jp/mylist/6280579']
[debug] Encodings: locale cp932, fs mbcs, out cp932, pref cp932
[debug] youtube-dl version 2017.07.23
[debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg 2.8.4, ffprobe N-86482-gbc40674
[debug] Proxy map: {}
[NiconicoPlaylist] 6280579: Downloading webpage
[download] Downloading playlist: ささくれUKのまいりすりす。|'ω'|三|&#
039;ω'|
[NiconicoPlaylist] playlist ささくれUKのまいりすりす。|'ω'|三|'
ω'|: Collected 75 video ids (downloading 75 of them)
[download] Downloading video 1 of 75
[niconico] sm1885027: Downloading webpage
[niconico] sm1885027: Downloading video info page
[niconico] sm1885027: Downloading flv info
[debug] Invoking downloader on 'http://smile-cca22.nicovideo.jp/smile?v=1885027.
51587'
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpu6zpd7mk\bu
ild\youtube_dl\YoutubeDL.py", line 1863, in process_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpu6zpd7mk\bu
ild\youtube_dl\YoutubeDL.py", line 1805, in dl
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpu6zpd7mk\bu
ild\youtube_dl\downloader\common.py", line 361, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpu6zpd7mk\bu
ild\youtube_dl\downloader\http.py", line 61, in real_download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpu6zpd7mk\bu
ild\youtube_dl\YoutubeDL.py", line 2166, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_defau
lt
urllib.error.HTTPError: HTTP Error 403: Forbidden
<end of log>

Description of your issue, suggested solution and other information

This one didn't work (HTTP 403): http://www.nicovideo.jp/mylist/6280579
This one succeeded (downloaded 4 out of 4 videos): http://www.nicovideo.jp/mylist/42797529

Single videos and some "My Lists" can be downloaded, but some "My Lists" throw HTTP 403 upon attempting to download the first video. Using a non-premium Niconico account, cookies exported from Mozilla Firefox using https://addons.mozilla.org/firefox/addon/export-cookies

If you want to try to reproduce, you'll need a free Niconico account and you'll need to export your session's cookies.

I suspected it could be because I tried downloading too many videos simultaneously, but no, even 4+ simultaneous downloads didn't result in 403 or download failure.

Also, the --ignore-errors key did't help, all videos from the "My Lists" were 403'd.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jul 23, 2017

Most likely the cookies is outdated. I use exactly the same Firefox addon to export cookies and it works:

$ youtube-dl -v http://www.nicovideo.jp/mylist/6280579 --cookies ~/cookies.txt --ignore-config
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'http://www.nicovideo.jp/mylist/6280579', '--cookies', '/home/yen/cookies.txt', '--ignore-config']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.07.23
[debug] Git HEAD: e3ce912c3
[debug] Python version 3.6.2 - Linux-4.11.9-1-ARCH-x86_64-with-arch-Arch-Linux
[debug] exe versions: ffmpeg 3.3.2, ffprobe 3.3.2
[debug] Proxy map: {}
[NiconicoPlaylist] 6280579: Downloading webpage
[download] Downloading playlist: ささくれUKのまいりすりす。|&#039;ω&#039;|三|&#039;ω&#039;|
[NiconicoPlaylist] playlist ささくれUKのまいりすりす。|&#039;ω&#039;|三|&#039;ω&#039;|: Collected 75 video ids (downloading 75 of them)
[download] Downloading video 1 of 75
[niconico] sm1885027: Downloading webpage
[niconico] sm1885027: Downloading video info page
[niconico] sm1885027: Downloading flv info
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'http://smile-cca22.nicovideo.jp/smile?m=1885027.51587low'
[download] Destination: 【初音ミクオリジナル曲】PICO@LUV (☆彡とvとAIのウタ。)【手描きPV付き】-sm1885027.flv
[download] 100% of 7.66MiB in 01:27
[download] Downloading video 2 of 75
[niconico] sm2272180: Downloading webpage
[niconico] sm2272180: Downloading video info page
[niconico] sm2272180: Downloading flv info
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'http://smile-cca51.nicovideo.jp/smile?m=2272180.88498low'
[download] Destination: 【鏡音リンオリジナル曲】モバイリ:センセーション【手描きPV付き】-sm2272180.flv
[download]  55.8% of 10.30MiB at 101.05KiB/s ETA 00:46^Csys:1: ResourceWarning: unclosed file <_io.BufferedWriter name='【鏡音リンオリジナル曲】モバイリ:センセーション【手描きPV付き】-sm2272180.flv.part'>

ERROR: Interrupted by user

Alternatively, you can use built-in logging options -u/-p or --netrc, which should be more stable.

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.