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 download does not work anymore #11170

Closed
romanrm opened this issue Nov 12, 2016 · 18 comments
Closed

Niconico download does not work anymore #11170

romanrm opened this issue Nov 12, 2016 · 18 comments
Assignees

Comments

@romanrm
Copy link

@romanrm romanrm commented Nov 12, 2016

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 2016.11.08.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 2016.11.08.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 http://www.nicovideo.jp/watch/sm30023059 --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'http://www.nicovideo.jp/watch/sm30023059', u'--verbose']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.11.08.1
[debug] Python version 2.7.9 - Linux-4.4.30-rm2+-x86_64-with-debian-8.6
[debug] exe versions: none
[debug] Proxy map: {}
[niconico] sm30023059: Downloading webpage
[niconico] sm30023059: Downloading video info page
[niconico] sm30023059: Downloading webpage
ERROR: Unable to extract thumbPlayKey; 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.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 694, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 357, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/niconico.py", line 141, in _real_extract
    r'\'thumbPlayKey\'\s*:\s*\'(.*?)\'', ext_player_info, 'thumbPlayKey')
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 660, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract thumbPlayKey; 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.

Description of your issue, suggested solution and other information

Used to work until very recently, but now it doesn't. I have looked through the source of the Niconico page and indeed it doesn't contain a string like "thumbPlayKey".

@zayuim
Copy link

@zayuim zayuim commented Nov 13, 2016

I can also confirm, I was just about to open a ticket myself. Although it seems to work with a few videos. E.g I was able to download this .swf
http://www.nicovideo.jp/watch/nm3601701

But couldn't download other videos:
http://www.nicovideo.jp/watch/sm8628149

@gspace3d
Copy link

@gspace3d gspace3d commented Nov 14, 2016

Many nicovideos seem to have began requiring login account to download.
I succeeded to download most of nicovideos by adding following options to youtube-dl.
--username {username} --password {password}
Of course, {username},{password} must be registered on nicovideo site.

@romanrm
Copy link
Author

@romanrm romanrm commented Nov 14, 2016

Niconico requires login for viewing many (most?) videos since a long time. However:

  • They do work without login when viewed via an embed player on other sites
  • This never prevented youtube-dl from working without login on all of them.
@dstftw dstftw mentioned this issue Nov 18, 2016
4 of 8 tasks complete
@ghost
Copy link

@ghost ghost commented Nov 20, 2016

Same here. Stopped working for me.

@yan12125 yan12125 mentioned this issue Nov 27, 2016
4 of 8 tasks complete
@yan12125 yan12125 added the broken-IE label Nov 27, 2016
@yan12125 yan12125 self-assigned this Nov 27, 2016
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 27, 2016

I have an imcomplete fix. Those who are interested can check https://github.com/yan12125/youtube-dl/tree/wip-niconico

@romanrm
Copy link
Author

@romanrm romanrm commented Dec 13, 2016

I can confirm that if you provide your niconico password and username with -u and -p options, then the download works fine. Still would be nice to fix downloading without that, as not everyone wants to sign up on every site.

@yan12125 yan12125 removed the broken-IE label Jan 15, 2017
@yan12125 yan12125 closed this in 8e4988f Jan 15, 2017
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 15, 2017

They do work without login when viewed via an embed player on other sites

@romanrm When I was implementing the incomplete fix 2 months ago, there are indeed some videos available via embedded players. Unfortunately, apparently all such ways are blocked now. So I just remove the old codes and add a clearer error message.

If anyone knows how to play Niconico videos without an account, feel free to open a new issue.

@yash1610
Copy link

@yash1610 yash1610 commented Feb 24, 2017

Can't download NicoNico videos even when credentials are provided

[debug] System config: []
[debug] User config: ['-o', '/home/yash/Youtube/%(title)s.%(ext)s']
[debug] Custom config: []
[debug] Command-line args: ['http://www.nicovideo.jp/watch/sm27643036', '--username', 'PRIVATE', '--password', 'PRIVATE', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.02.22
[debug] Python version 3.6.0 - Linux-4.9.11-1-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4, rtmpdump 2.4
[debug] Proxy map: {}
[niconico] Logging in
[niconico] sm27643036: Downloading webpage
[niconico] sm27643036: Downloading video info page
[niconico] sm27643036: Downloading flv info
ERROR: Niconico videos now require logging in
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 704, in extract_info
ie_result = ie.extract(url)
  File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/common.py", line 427, in extract
ie_result = self._real_extract(url)
  File "/usr/lib/python3.6/site-packages/youtube_dl/extractor/niconico.py", line 142, in _real_extract
expected=True)
youtube_dl.utils.ExtractorError: Niconico videos now require logging in
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Feb 25, 2017

http://www.nicovideo.jp/watch/sm27643036 works fine here:

$ youtube-dl -v http://www.nicovideo.jp/watch/sm27643036 --netrc
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'http://www.nicovideo.jp/watch/sm27643036', '--netrc']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.02.24.1
[debug] Git HEAD: 204efc850
[debug] Python version 3.6.0 - Linux-4.9.11-1-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[niconico] Logging in
[niconico] sm27643036: Downloading webpage
[niconico] sm27643036: Downloading video info page
[niconico] sm27643036: Downloading flv info
[debug] Invoking downloader on 'http://smile-fnl50.nicovideo.jp/smile?m=27643036.95200low'
[download] Destination: 〔れをる〕 脳内革命ガール 〔ill.bell〕-sm27643036.mp4
[download] 100% of 10.86MiB in 01:43

Are you using Twitter/Facebook/Nintendo accounts? Currently only NicoNico accounts are supported.

@yash1610
Copy link

@yash1610 yash1610 commented Feb 25, 2017

Nope this is a totally new account directly registered on niconico.

Also putting my credentials in ~/.netrc works and I can download from niconico(I just checked after seeing the netrc argument in your command), but if I pass the username and password then youtube-dl gives the error

screenshot from 2017-02-25 16-51-08

Sorry for the weird censoring, I am just hiding my password. As you can see in the screenshot the login credentials from the ~/.netrc file work properly but give out an error when passed as arguments.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Feb 25, 2017

--username and --password works for me, too

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'http://www.nicovideo.jp/watch/sm27643036', '--username', 'PRIVATE', '--password', 'PRIVATE']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.02.24.1
[debug] Git HEAD: db182c63f
[debug] Python version 3.6.0 - Linux-4.9.11-1-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[niconico] Logging in
[niconico] sm27643036: Downloading webpage
[niconico] sm27643036: Downloading video info page
[niconico] sm27643036: Downloading flv info
[debug] Invoking downloader on 'http://smile-fnl50.nicovideo.jp/smile?m=27643036.95200low'
[download] Destination: 〔れをる〕 脳内革命ガール 〔ill.bell〕-sm27643036.mp4
[download]   9.2% of 10.86MiB at  2.53MiB/s ETA 00:03^CException ignored in: <_io.FileIO name='〔れをる〕 脳内革命ガール 〔ill.bell〕-sm27643036.mp4.part' mode='wb' closefd=True>
ResourceWarning: unclosed file <_io.BufferedWriter name='〔れをる〕 脳内革命ガール 〔ill.bell〕-sm27643036.mp4.part'>

ERROR: Interrupted by user

I guess there are some special characters in your password and your shell does not pass it correctly?

@yash1610
Copy link

@yash1610 yash1610 commented Feb 25, 2017

nope my password is a mix of small/capital numbers/alphabets no symbols at all.

Edit: Your 2017.02.24.1 version seems to be newer than mine 2017.02.22

Edit 2: checked the diff between both our versions and I can't see anything that might cause the issue I am having and you are not

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Feb 25, 2017

That's strange. --netrc works for you but --username and --password not?

Try to change the line 901 of /usr/lib/python3.6/site-packages/youtube_dl/options.py, replace _hide_login_info(conf) with simply conf and see whether the passwords are identical or not for --netrc and --username/--password.

@yash1610
Copy link

@yash1610 yash1610 commented Feb 25, 2017

yep the password being passed through the argument is correct (same as the one in netrc).

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Feb 25, 2017

Can't imagine why... Fortunately .netrc works.

@yash1610
Copy link

@yash1610 yash1610 commented Feb 25, 2017

yep fortunately it works, bugs they sure are weird.

P.S upgraded to the youtube-dl-git version from AUR and the issue is still there.

@yash1610 yash1610 mentioned this issue Mar 19, 2017
4 of 8 tasks complete
@ghost
Copy link

@ghost ghost commented May 29, 2017

Windows user; unable to use ".netrc workaround." Have tested with currently available version (just upgraded to be sure); have niconico account; -u / -p command line options don't work.

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--ignore-errors', '-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2017.05.23
[debug] Python version 3.4.4 - Windows-Vista-6.0.6002-SP2
[debug] exe versions: avconv v13_dev0-753-gba6a49e, avprobe v13_dev0-753-gba6a49e, ffmpeg
1.2
[debug] Proxy map: {}
Usage: YouTube-dl.exe [OPTIONS] URL [URL...]

youtube-dl.exe -u <user> -p <pass> http://www.nicovideo.jp/watch/nm3362855
[niconico] Logging in
[niconico] nm3362855: Downloading webpage
[niconico] nm3362855: Downloading video info page
[niconico] nm3362855: Downloading flv info
ERROR: Niconico videos now require logging in

@acruis
Copy link

@acruis acruis commented Jun 6, 2017

FWIW I used the e-mail address for the username field and it works.

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