LifeActor / ykdl

a video downloader focus on China mainland video sites.(一款专注于中国大陆视频网站的视频下载器。)
https://github.com/LifeActor/ykdl
Other
1.45k stars 285 forks source link

好像没法看抖音直播世界杯? #615

Closed zizhengwu closed 2 years ago

zizhengwu commented 2 years ago

使用的是最新的 master 版本。请将错误输出粘贴在下面:

❯ ykdl https://live.douyin.com/fifaworldcup/7079013104176267295 -p mpv --debug
DEBUG:ykdl.util.http:Add <urllib.request.ProxyHandler object at 0x7f04f2516a40> to default handlers
DEBUG:ykdl.common:host> live.douyin.com
DEBUG:ykdl.common:short_name> douyin
DEBUG:ykdl.util.http:Add <urllib.request.HTTPCookieProcessor object at 0x7f04f178e920> to default handlers
DEBUG:ykdl.util.http:get_response> URL: https://live.douyin.com/fifaworldcup/7079013104176267295
DEBUG:YKDL:'__ac_nonce'
Traceback (most recent call last):
  File "/home/zizhengwu/git/ykdl/lib/python3.10/site-packages/cykdl/__main__.py", line 318, in main
    for rc in map(handle_video, args.video_urls):
  File "/home/zizhengwu/git/ykdl/lib/python3.10/site-packages/cykdl/__main__.py", line 227, in handle_video
    info = parser(u)
  File "/home/zizhengwu/git/ykdl/lib/python3.10/site-packages/ykdl/extractor.py", line 44, in parser
    info = self.prepare()
  File "/home/zizhengwu/git/ykdl/lib/python3.10/site-packages/ykdl/extractors/douyin/live.py", line 35, in prepare
    html = _byted.get_content(self.url)
  File "/home/zizhengwu/git/ykdl/lib/python3.10/site-packages/ykdl/extractors/_byted.py", line 65, in get_content
    cookies = get_signed_cookies(url)
  File "/home/zizhengwu/git/ykdl/lib/python3.10/site-packages/ykdl/extractors/_byted.py", line 42, in get_signed_cookies
    '__ac_signature': get_signer(url)('', cookies['__ac_nonce']),
KeyError: '__ac_nonce'
zizhengwu commented 2 years ago

谢谢!能播放了,但发现好像播放的是默认的超清1080P而不是超高清4k高码率,如下图 chrome_sB4omvjua8

❯ ykdl https://live.douyin.com/fifaworldcup/7079010811733213214 -p mpv
site:                 抖音直播 (Douyin)
title:                世界杯小组赛B组第2轮 威尔士 VS 伊朗 - 抖音体育
artist:               抖音体育
streams:
    - format:         OG OG-M3U
      container:      m3u8
      video-profile:  原画
    # download-with:  ykdl --format=OG-M3U [URL]
SeaHOH commented 2 years ago

现在排序正常了,不过显示的规格可能与实际内容不匹配。

zizhengwu commented 2 years ago

多谢这么快修复!又试了下,现在播放的是超高清4k,但并不是超高清4k高码率。前者是 25 帧,后者是 50 帧

❯ ykdl https://live.douyin.com/fifaworldcup/7078589836172640270 -p mpv
site:                 抖音直播 (Douyin)
title:                世界杯小组赛A组第2轮 卡塔尔 VS 塞内加尔 - 抖音体育
artist:               抖音体育
streams:
    - format:         BD BD-FLV
      container:      flv
      video-profile:  蓝光
    # download-with:  ykdl --format=BD-FLV [URL]

SeaHOH commented 2 years ago

从页面本身无法获取到你提到的格式,可能需要再请求相关 API 获取。