chat-downloader icon indicating copy to clipboard operation
chat-downloader copied to clipboard

[FEATURE] Autogenerate filename (`upload_date`)

Open JC-Chung opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe.

Always wrote the date in the filename by myself. Like

:: cdl.bat
@echo off
set t=%1
set h=%t:~0,22%
set u=%t:~12,10%
@echo on
chat_downloader --output %h%-{title}-chat.json https://www.twitch.tv/videos/%u%

> cdl.bat [20221207]-v1111111111
> chat_downloader --output [20221207]-v1111111111-{title}-chat.json https://www.twitch.tv/videos/1111111111

Describe the solution you'd like

Add upload_date.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here. Can check upload_date in https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/extractor/common.py#L2249 and https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/utils.py#L1803

upload_date:    Video upload date in UTC (YYYYMMDD).
                If not explicitly set, calculated from timestamp (start_time in this?)

-- And add param id and type id in Chat() __init__

JC-Chung avatar Dec 08 '22 12:12 JC-Chung