xenova / chat-downloader

A simple tool used to retrieve chat messages from livestreams, videos, clips and past broadcasts. No authentication needed!
https://chat-downloader.readthedocs.io/
MIT License
902 stars 127 forks source link

[FEATURE] [Twitch] Add `{datetime}` in ouput operation #232

Open JC-Chung opened 9 months ago

JC-Chung commented 9 months ago

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

I'm used to adding the date to the filename like [20231126]-v0000000000-{title}-chat.json, but since chat_downloader doesn't support it, I have to enter the date manually every time.

Describe the solution you'd like

Add {datetime} support.

Describe alternatives you've considered

https://github.com/xenova/chat-downloader/blob/94ed3fe9dd2af8f193ea5b25adc7509a8cbb0e63/chat_downloader/sites/twitch.py#L1232

        duration = video.get('lengthSeconds')
        createdAt = video.get('createdAt')  # "2023-11-26T05:06:42Z"

        return Chat(
            ...
            datetime=createdAt
        )

Additional context

By the way, although it doesn't affect the results, some sha256hash has new values that can be updated. StreamMetadata ChannelVideoShelvesQuery ClipsCards__User VideoMetadata ChannelCollectionsContent and VideoPreviewOverlay