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

Nico has relaunched #174

Closed
49 tasks done
AlexAplin opened this issue Aug 5, 2024 · 4 comments
Closed
49 tasks done

Nico has relaunched #174

AlexAplin opened this issue Aug 5, 2024 · 4 comments

Comments

@AlexAplin
Copy link
Owner

AlexAplin commented Aug 5, 2024

The site has relaunched with a new version label and a fresh coat of paint. The download flow looks similar to what was on Re:Kari. The page params define many new APIs.

Verified functions (at current HEAD commit):

  • Videos
    • Downloading video + audio
    • Check on complete downloads
    • Downloading audio only (-vn)
    • Downloading video only (-an)
    • Listing video and audio qualities (-Q)
    • Specifying qualities (-vq, -aq)
    • Downloading comments (-c)
    • Downloading thumbnail (-t)
    • Ensure all parameters are appropriately extracted for output templates (-o)
    • Force high quality (-f)
      • Need verification from non-premium users during eco hours
    • Dump metadata
    • Adding metadata to the MP4 container
    • Proxy downloads (-y)
    • English and Taiwan sites (-e, --chinese)
    • Multithreads (-r)
    • Verify changes to channel videos being temporarily unavailable (so#)
    • Verify if there are any changes to videos reported deleted, DMCA, region blocked, etc.
      • Still need to verify region blocks (REGION_LOCK_ERRORS and the classes we key off, or if there's a better way to do this now)
  • Mylists/series
    • Requesting individual mylist
    • Verify pagination/count
  • Seiga (images)
    • Downloading image
    • Ensure all parameters are appropriately extracted for output templates (-o)
  • Seiga (manga)
    • Downloading individual chapters
    • Downloading a manga
    • Verify if encrypted images can still be retrieved
    • Ensure all parameters are appropriately extracted for output templates (-o)
  • Users
    • Downloading videos
    • Downloading mylists
    • Downloading images (Seiga)
    • Downloading manga (Seiga)
  • Channels
  • Niconama
    • Generating stream URLs
      • Verified with user and official broadcasts, we will want to check this again when channels come back
    • Verify if there are any changes to stream types
      • Nothing looks changed here
  • Logins
    • Verify login flow still works as expected (email/tel, OTP)
    • Session cookie (--session-cookie)
    • Guest sessions (-g)
    • Determine if there are any changes asociated with 2FA and the mandatory password reset
      • Seems fine?
  • Verify --playlist-start is respected
  • Verify --break-on-existing is respected
  • Verify --skip-media is respected
  • Ensure all API headers match
    • Seem consistent except for X-Requested-With, changed in 86ae50a
@AlexAplin
Copy link
Owner Author

AlexAplin commented Aug 6, 2024

Looks like we will be able to get most of the metadata params in the server-response block, including qualities. This looks like it's pretty much the same as DMS, so I think it's just necessary to update the params extraction.

Video download flow is again roughly:

  • Extract track ID from ["response"]["client"]["watchTrackId"]
  • Extract key from ["response"]["media"]["domand"]["accessRightKey"]
  • OPTIONS to https://nvapi.nicovideo.jp/v1/watch/[videoId]/access-rights/hls?actionTrackId=[watchTrackId]
  • POST to same endpoint, specifying X-Access-Right-Key as extracted
    • The same API_HEADERS are still specified here, additionally X-Request-With: nicovideo
    • On 201 response, extract the .m3u8 playlist from ["data"]["contentUrl"] (https://delivery.domand.nicovideo.jp/hlsbid/.../playlists/variants/....m3u8)
  • Extract streams from manifest

The comments API has changed again to https://public.nvcomment.nicovideo.jp/v1/threads, but the POST data and response look the same. Not sure if the endpoint can be extracted but the host is also on the video page as: <link data-server="1" rel="preconnect" href="https://public.nvcomment.nicovideo.jp" />

AlexAplin added a commit that referenced this issue Aug 6, 2024
@AlexAplin
Copy link
Owner Author

I pushed a change now that should make general downloading work again. Follow the chart above as I keep checking/fixing things.

@AlexAplin
Copy link
Owner Author

From what I can tell, DMC params are now nulled entirely, like legacy delivery. Opened #180 for investigation.

@AlexAplin
Copy link
Owner Author

Didn't find much broken after verification. If something new is discovered, please open a new issue for tracking.

@AlexAplin AlexAplin unpinned this issue Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant