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] Report errors when login fails #12486

Closed
technolapin opened this issue Mar 18, 2017 · 13 comments
Closed

[niconico] Report errors when login fails #12486

technolapin opened this issue Mar 18, 2017 · 13 comments
Labels

Comments

@technolapin
Copy link

@technolapin technolapin commented Mar 18, 2017


  • I've verified and I assure that I'm running youtube-dl 2017.03.16
  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

My issue is:

  • 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


$ youtube-dl -v -u technolapin http://www.nicovideo.jp/watch/sm27905394
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-u', 'PRIVATE', 'http://www.nicovideo.jp/watch/sm27905394']
Type account password and press [Return]: 
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.03.16
[debug] Python version 3.6.0 - Linux-4.4.52-1-MANJARO-x86_64-with-glibc2.3.4
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4, rtmpdump 2.4
[debug] Proxy map: {}
[niconico] Logging in
[niconico] sm27905394: Downloading webpage
[niconico] sm27905394: Downloading video info page
[niconico] sm27905394: Downloading flv info
ERROR: Niconico videos now require logging in
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/youtube_dl-2017.3.16-py3.6.egg/youtube_dl/YoutubeDL.py", line 761, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3.6/site-packages/youtube_dl-2017.3.16-py3.6.egg/youtube_dl/extractor/common.py", line 427, in extract
    ie_result = self._real_extract(url)
  File "/usr/lib/python3.6/site-packages/youtube_dl-2017.3.16-py3.6.egg/youtube_dl/extractor/niconico.py", line 142, in _real_extract
    expected=True)
youtube_dl.utils.ExtractorError: Niconico videos now require logging in

<end of log>


Description of my issue

Seems that I cannot log in.
The usernames and passwords are the good ones. The problem is somewhere else.
There is no possible char misencoding. Only ascii for this account.
I don't know if the loggin happens. Maybe it does and I'm logged out imediatly or maybe it just doesn't and doesn't warn me.
The other possibility is: maybe niconico changed AGAIN something and youtube-dl isn't following.
It makes several weeks (2 or 3) that I have this bug.
I did a full sys update and nothing got solved.

@yash1610
Copy link

@yash1610 yash1610 commented Mar 19, 2017

put the username/password in yout netrc file and it should work

Refer to the bottom part of the issue #11170

@ghost
Copy link

@ghost ghost commented May 29, 2017

I, too, can't get NICONICO videos, with the -p / --password and -u /--username parameters. I am using your WINDOWS client, so the ".netrc" option isn't available to me. I realize that the ".netrc" option is only a WORKAROUND, not a solution, but reading the comments on #11170 suggest that you would prefer people to use the workaround instead of (1) repairing the login credentials / (2) removing the -p/-u options outright.

There is a song that is ONLY available on this website; I have no other options.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 29, 2017

Closing as no feedback for a long time. I assume it works for the original poster.
@maimizuno I've added an example for how to use .netrc on Windows in the last line of https://github.com/rg3/youtube-dl#authentication-with-netrc-file. It works for me:

G:\tmp>youtube-dl.exe -v --netrc http://www.nicovideo.jp/watch/nm3362855
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--netrc', 'http://www.nicovideo.jp/watch/nm3362855']
[debug] Encodings: locale cp950, fs mbcs, out cp950, pref cp950
[debug] youtube-dl version 2017.05.29
[debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1
[debug] exe versions: none
[debug] Proxy map: {}
[niconico] Logging in
[niconico] nm3362855: Downloading webpage
[niconico] nm3362855: Downloading video info page
[niconico] nm3362855: Downloading flv info
[debug] Invoking downloader on 'http://smile-cca62.nicovideo.jp/smile?s=3362855.12144as3'
[download] Destination: 【チエ・カジウラ】 06. What's my name  【Gift 25】-nm3362855.swf
[download] 100% of 2.01MiB in 00:00

If that's still broken for you, feel free to leave comments below.

@yan12125 yan12125 closed this May 29, 2017
@ghost
Copy link

@ghost ghost commented May 31, 2017

I followed all instructions as listed, yet I get the same result.

The program sees the default conf, and knows to use the .netrc file (I tested without the file present first, and it complained).

Still gives the same result: logging in, getting video information, then ... "you have to login" ....

youtube-dl 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

I have "niconico" as the "machine" (which isn't really clarified as to what to put there). Should it be something else? An example of your .netrc file would be helpful for duplication purposes (with appropriate redacting, of course).

Personally, I would prefer the COMMAND LINE flags to work. If I have to copy / move my programs to another machine, I don't have to hunt-and-peck for place files like these; my aliases to command-line flags can (and do) successfully do the job.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 31, 2017

This is my .netrc:

machine niconico
    login my@email.account
    password top_s3cr3t_passw0rd

Personally, I would prefer the COMMAND LINE flags to work. If I have to copy / move my programs to another machine, I don't have to hunt-and-peck for place files like these; my aliases to command-line flags can (and do) successfully do the job.

Let's find out why credentials do not work first. Could you run youtube-dl -v --write-pages --netrc http://www.nicovideo.jp/watch/nm3362855 and paste the output as well as uploading all *.dump files?

@ghost
Copy link

@ghost ghost commented May 31, 2017

And we have a winner!

On the website, you only have to provide your username. For the .netrc file, you must provide your registration email address. That was the issue. Your posting your [altered] sample was the key.

Truth be told, command-line is easier for me (portability: bringing flash drive to and from work). Since the flags are supported in the first place, shouldn't "fixing them" be on the horizon instead of relying on workaround / one-machine-at-a-time-only solutions?

@Hrxn
Copy link

@Hrxn Hrxn commented May 31, 2017

If .netrc works, flags on command line should too..

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 31, 2017

On the website, you only have to provide your username.

I use gmail, and niconico says "Email address or password incorrect." if I omit the @gmail.com part. What is your email provider?

Truth be told, command-line is easier for me

As @Hrxn said, command line flags should work if .netrc works. Could you try again with full email address?

@ghost
Copy link

@ghost ghost commented May 31, 2017

While I experiment, can I make the intermediate suggestion: if the login fails, a better failure message would be helpful. "This website requires a login" didn't help me understand the issue. "Login failed"
would make more sense. I'll let you know about the CLI flags momentarily.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 31, 2017

An error message is useful. Let's reopen.

@yan12125 yan12125 reopened this May 31, 2017
@yan12125 yan12125 changed the title loggin issue with niconico [niconico] Report errors when login fails May 31, 2017
@ghost
Copy link

@ghost ghost commented May 31, 2017

FYI, using the full email worked successfully.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jul 11, 2017

This will be fixed in the next version. Sorry for being late as I was quite busy on my thesis the last month.

@ghost
Copy link

@ghost ghost commented Jul 15, 2017

Hope your thesis presentation went well.

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.