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

Output Filename Template: Request for upload-datetime #1706

Closed
himadri0327 opened this issue Nov 2, 2013 · 8 comments
Closed

Output Filename Template: Request for upload-datetime #1706

himadri0327 opened this issue Nov 2, 2013 · 8 comments

Comments

@himadri0327
Copy link

The current %(upload_date)s gives YYYYMMDD. Could you please consider adding another that includes time like YYYYMMDD-hhmmss ? Maybe a date-time combination option %(upload_datetime)s or a separate %(upload_time)s ?

@keybounce
Copy link

Bump.

I was just about to suggest this when I found it as a suggestion. I too would like an "HHMMSS" field that could be added to the existing YYYYMMDD fields.

@l0b0
Copy link

l0b0 commented Dec 9, 2017

Looks like because the way youtube-dl is architected (each site having custom code to extract the date string, and then unifying the formatting but returning the result as a string rather than a datetime) this might involve a lot of change (but none of it very complex AFAICT):

  1. Instead of using unified_strdate return a datetime object in _real_extract and equivalent.
  2. Detect when info_dict contains a datetime and format it when necessary. That way even the datetime formatting could be a configuration directive or parameter.

Does this seem sane?

@djmixman
Copy link

djmixman commented Aug 4, 2018

Almost 5 years now... Still can't include an HHMM in the filename :'(

@tecxy
Copy link

tecxy commented Sep 29, 2018

I would be happy to get the format "YYYY-MM-DDTHH:MM:SS " in the filename too.

@shillshocked
Copy link

Upvoted!

@duckpuppy
Copy link

Having a separate upload_time field would be fine - If you're grabbing from a source that doesn't provide the time, then you won't use it in any templates or code, and it can default to midnight in whatever timezone the date is in (which should be knowable per extractor)... or just not be in the info_dict at all if it's not provided, and dependent code can check to see if upload_time is available as necessary. Since the extractors abstract all the parsing of the video info, they can make the determination on what should be in the upload_time field, or if it should exist in the dict at all.

@l0b0 has a decent suggestion as well to keep things unified.

@pukkandan
Copy link
Contributor

There is already a timestamp field. Note however that if you are using YouTube, they don't provide the time information, so only the upload_date is available

@dirkf dirkf closed this as not planned Won't fix, can't repro, duplicate, stale May 1, 2024
@dirkf dirkf added the won't fix label May 1, 2024
@dirkf
Copy link
Contributor

dirkf commented May 3, 2024

However, now: yt-dlp/yt-dlp#9829 (comment).

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

9 participants