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

Unable to download some nicovideo.jp videos #3753

Closed
ariasuni opened this issue Sep 14, 2014 · 8 comments
Closed

Unable to download some nicovideo.jp videos #3753

ariasuni opened this issue Sep 14, 2014 · 8 comments

Comments

@ariasuni
Copy link

@ariasuni ariasuni commented Sep 14, 2014

Here it is:

$ youtube-dl --verbose http://www.nicovideo.jp/watch/sm18468312
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.nicovideo.jp/watch/sm18468312']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.09.14.3
[debug] Python version 3.4.1 - Linux-3.16.2-1-ARCH-x86_64-with-arch
[debug] Proxy map: {}
[niconico] sm18468312: Downloading webpage
[niconico] sm18468312: Downloading video info page
[niconico] sm18468312: Downloading webpage
ERROR: Unable to extract thumbPlayKey; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 523, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3.4/site-packages/youtube_dl/extractor/common.py", line 178, in extract
    return self._real_extract(url)
  File "/usr/lib/python3.4/site-packages/youtube_dl/extractor/niconico.py", line 95, in _real_extract
    r'\'thumbPlayKey\'\s*:\s*\'(.*?)\'', ext_player_info, 'thumbPlayKey')
  File "/usr/lib/python3.4/site-packages/youtube_dl/extractor/common.py", line 399, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract thumbPlayKey; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
@naglis
Copy link
Collaborator

@naglis naglis commented Oct 10, 2014

I can reproduce it, however, I don't have a fix. As a workaround, I've found that it does work if you provide valid login information.

@ariasuni
Copy link
Author

@ariasuni ariasuni commented Oct 11, 2014

How am I supposed to provide login information to youtube-dl?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 11, 2014

youtube-dl -u username -p password http://www.nicovideo.jp/watch/sm18468312
Alternatively, you can use .netrc in order not to pass it all the time.

@ariasuni
Copy link
Author

@ariasuni ariasuni commented Oct 11, 2014

I searched for «login» and I didn’t find anything in the man page, so it’s my fault.

But it seems the netrc feature is not documented (How should I format the file?! Why youtube-dl ignore it even with -n or --netrc flag?), but I finally figured out that I need to use single quotes so that my username and password are not interpreted by the shell.

There’s a valid nicovideo account in the source code, but I don’t know how to use it.

naglis pushed a commit that referenced this issue Oct 12, 2014
Naglis Jonaitis
See issue #3753
@naglis
Copy link
Collaborator

@naglis naglis commented Oct 12, 2014

Yes, the --netrc flag was indeed ignored in case of niconico. It's should be fixed in version 2014.10.12 and newer.

Example contents of .netrc file to use with niconico:

machine niconico
login you@example.com
password your_password

Just change the email and password to those of your account. More information on the .netrc file.

We can't stop you from using the credentials found in the source code, however, I am not sure if this is encouraged (@phihag, what do think?).

phihag added a commit that referenced this issue Oct 12, 2014
@ariasuni
Copy link
Author

@ariasuni ariasuni commented Oct 12, 2014

Thank you very much.

We can't stop you from using the credentials found in the source code, however, I am not sure if this is encouraged (@phihag, what do think?).

Why are there here in the first place? I wondered if they can be used by using a particular flag, but it doesn’t seem so.

@phihag
Copy link
Contributor

@phihag phihag commented Oct 12, 2014

The credentials in the source code are just for testing the login code.

While we cannot hinder you to use them, we do not support or condone their usage for anything but testing the niconico's extractor login code. Experience shows that the password may be changed or the account deleted at some time.

@phihag
Copy link
Contributor

@phihag phihag commented Oct 12, 2014

You can now log in to niconico both with command-line options as well as netrc in youtube-dl 2014.10.12. Refer to our FAQ on how to update.

I've also added the keyword login to the --help output (our documentation will be generated from that in the next release).

@phihag phihag closed this Oct 12, 2014
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
4 participants
You can’t perform that action at this time.