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

[Broken] Niconico - Long videos fail downloading #72

Open
5 tasks done
FastedCoyote opened this issue Oct 31, 2020 · 1 comment · May be fixed by #86
Open
5 tasks done

[Broken] Niconico - Long videos fail downloading #72

FastedCoyote opened this issue Oct 31, 2020 · 1 comment · May be fixed by #86

Comments

@FastedCoyote
Copy link

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dlc version 2020.10.26
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

$ youtube-dlc --ignore-config --verbose 'https://www.nicovideo.jp/watch/sm29303999'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--ignore-config', u'--verbose', u'https://www.nicovideo.jp/watch/sm29303999']
[debug] Loading archive file None
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dlc version 2020.10.26
[debug] Python version 2.7.18 (CPython) - Linux-5.4.0-52-generic-x86_64-with-Ubuntu-20.04-focal
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4
[debug] Proxy map: {}
[niconico] sm29303999: Downloading webpage
[niconico] sm29303999: Downloading JSON metadata for h264_360p-aac_64kbps
[niconico] sm29303999: Downloading JSON metadata for h264_360p_low-aac_64kbps
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://pe03821af87.dmc.nico/vod/ht2_nicovideo/nicovideo-sm29303999_d12af73024e45c5410966649f9601391bdf4129f978a797c374c3bb3ce252d22?ht2_nicovideo=6-N0wawdNOqC_1604121810978.4nohp4qioy_qj1wb7_20e41xpuox7ii'
[download] Destination: 【東方】幻想万華鏡 第7話・巨大妖怪伝説の章【二次創作アニメ】-sm29303999.mp4
[download]  23.8% of 58.16MiB at 120.34KiB/s ETA 06:17[download] Got server HTTP error: Downloaded 14524539 bytes, expected 60982677 bytes. Retrying (attempt 1 of 10)...
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dlc/YoutubeDL.py", line 2003, in process_info
    success = dl(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dlc/YoutubeDL.py", line 1861, in dl
    return fd.download(name, info)
  File "/usr/local/bin/youtube-dl/youtube_dlc/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dlc/downloader/http.py", line 349, in real_download
    establish_connection()
  File "/usr/local/bin/youtube-dl/youtube_dlc/downloader/http.py", line 114, in establish_connection
    raise err
HTTPError: HTTP Error 403: Forbidden

Description

Downloading long videos requires heartbeat signals. Here's the description found in the original issue on youtube-dl's repo:

As of today, Nicovideo's seem to implemented a new session system. After every few minutes, the url of the video changes. This causes a 403 Forbidden error on the old url, Causing the Downloader to fail.
A screenshot of part of a video session:
chrome 2017-10-25 10 43 35 396

Resuming the download works just for a few minutes before the session is dropped.
Note: I have only tested on a non-premium account. Im not sure if it applies to the permium accounts or not.

URL example: https://www.nicovideo.jp/watch/sm29303999

@TimK50
Copy link

TimK50 commented Oct 31, 2020

Also returns bad url of formats for long youtube videos, https://www.youtube.com/watch?v=VI51y4dfrcM for example

insaneracist added a commit to insaneracist/yt-dlc that referenced this issue Oct 31, 2020
insaneracist added a commit to insaneracist/yt-dlc that referenced this issue Oct 31, 2020
@insaneracist insaneracist linked a pull request Oct 31, 2020 that will close this issue
9 tasks
siikamiika pushed a commit to siikamiika/yt-dlc that referenced this issue Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants