Creation Date / Uploaders Date #8

Closed
opened 2026-02-20 20:59:28 -05:00 by deekerman · 13 comments
Owner

Originally created by @rg3 on GitHub (Nov 1, 2010).

Was: http://bitbucket.org/rg3/youtube-dl/issue/159/

Is it possible to include the uploaders Date to the filename. The epoch option is the download date?

Originally created by @rg3 on GitHub (Nov 1, 2010). Was: http://bitbucket.org/rg3/youtube-dl/issue/159/ Is it possible to include the uploaders Date to the filename. The epoch option is the download date?
deekerman 2026-02-20 20:59:28 -05:00
  • closed this issue
  • added the
    request
    label
Author
Owner

@rg3 commented on GitHub (Nov 1, 2010):

No, sorry, the epoch is taken from the current time in your computer. I'll think about the upload date.

@rg3 commented on GitHub (Nov 1, 2010): No, sorry, the epoch is taken from the current time in your computer. I'll think about the upload date.
Author
Owner

@rg3 commented on GitHub (Nov 1, 2010):

Originally by anonymous:

I'd also like to see this feature -- for instance when downloading a series of videos which aren't otherwise numbered.

@rg3 commented on GitHub (Nov 1, 2010): Originally by anonymous: I'd also like to see this feature -- for instance when downloading a series of videos which aren't otherwise numbered.
Author
Owner

@rg3 commented on GitHub (Nov 1, 2010):

Originally by "XulChris":

Hi, please add this feature. I'm downloading a user's channel which has hundreds of videos and I would like them sorted in upload order. I would like to be able to use -o to specify a date/time format like YYYYMMDDHHMMSS

Thanks.

@rg3 commented on GitHub (Nov 1, 2010): Originally by "XulChris": Hi, please add this feature. I'm downloading a user's channel which has hundreds of videos and I would like them sorted in upload order. I would like to be able to use -o to specify a date/time format like YYYYMMDDHHMMSS Thanks.
Author
Owner

@v01d-cypher commented on GitHub (Nov 8, 2010):

I will have a look at implementing this. Only the upload date is specified not the time. I will make sure though. Regarding date format, it is possible to implement using strftime() notation. eg. '%Y%m%d' for YYYYMMDD, but the output format sequence needs to contain a name eg %(upldate)s, else parsing it will become unnecessarily complicated. So perhaps if we set it to YYYYMMDD as the default it should be fine for chronological ordering?

@v01d-cypher commented on GitHub (Nov 8, 2010): I will have a look at implementing this. Only the upload date is specified not the time. I will make sure though. Regarding date format, it is possible to implement using strftime() notation. eg. '%Y%m%d' for YYYYMMDD, but the output format sequence needs to contain a name eg %(upldate)s, else parsing it will become unnecessarily complicated. So perhaps if we set it to YYYYMMDD as the default it should be fine for chronological ordering?
Author
Owner

@rg3 commented on GitHub (Nov 8, 2010):

If they upload a video the same day, the order may not be preserved, but it may be fine for some users.

Edit: BTW, yes, in that case the reasonable option is YYYYMMDD. The template text could be "uploaddate", no need to shorten it.

@rg3 commented on GitHub (Nov 8, 2010): If they upload a video the same day, the order may not be preserved, but it may be fine for some users. Edit: BTW, yes, in that case the reasonable option is YYYYMMDD. The template text could be "uploaddate", no need to shorten it.
Author
Owner

@v01d-cypher commented on GitHub (Nov 12, 2010):

I will only be adding this to YoutubeIE for the time being. I will set the uploaddate to u'NA' for the other IEs.

@v01d-cypher commented on GitHub (Nov 12, 2010): I will only be adding this to YoutubeIE for the time being. I will set the uploaddate to u'NA' for the other IEs.
Author
Owner

@rg3 commented on GitHub (Nov 12, 2010):

Ok. That's a good start. As you said first, this is a general template parameter, so it should either be added to all IEs or set to NA. Ideally, the date would be extracted from any site that provides the information.

@rg3 commented on GitHub (Nov 12, 2010): Ok. That's a good start. As you said first, this is a general template parameter, so it should either be added to all IEs or set to NA. Ideally, the date would be extracted from any site that provides the information.
Author
Owner

@rg3 commented on GitHub (Nov 19, 2010):

I had to rewrite your code for "uploaddate" because it failed in my tests. By the way, I renamed the template parameter to "upload_date" after noticing there was already a "player_url" FD parameter, so as to be consistent. Anyway, the problem is now solved.

@rg3 commented on GitHub (Nov 19, 2010): I had to rewrite your code for "uploaddate" because it failed in my tests. By the way, I renamed the template parameter to "upload_date" after noticing there was already a "player_url" FD parameter, so as to be consistent. Anyway, the problem is now solved.
Author
Owner

@v01d-cypher commented on GitHub (Nov 23, 2010):

Hi, sorry I'm only replying now. I made a silly mistake in the code I commited when I refactored. Really sorry about that! Please view the comments I've made on the lines in your commit 138b11f (github.com/rg3/youtube-dl@138b11f36e (commitcomment-201370)). No probs with "upload_date" :-)

@v01d-cypher commented on GitHub (Nov 23, 2010): Hi, sorry I'm only replying now. I made a silly mistake in the code I commited when I refactored. Really sorry about that! Please view the comments I've made on the lines in your commit 138b11f (https://github.com/rg3/youtube-dl/commit/138b11f36ee5e8018c29621d39c324d98d8291cc#commitcomment-201370). No probs with "upload_date" :-)
Author
Owner

@rg3 commented on GitHub (Nov 23, 2010):

I've read the comments. You don't see dates in other languages because youtube-dl sets the language in YouTube prior to downloading the first video. That's why you see the line "[youtube] Setting language". Your method would appear to work here. I'll fully review it one of these days and may revert back to it, if just because it's better if I get rid of that month table.

@rg3 commented on GitHub (Nov 23, 2010): I've read the comments. You don't see dates in other languages because youtube-dl sets the language in YouTube prior to downloading the first video. That's why you see the line "[youtube] Setting language". Your method would appear to work here. I'll fully review it one of these days and may revert back to it, if just because it's better if I get rid of that month table.
Author
Owner

@v01d-cypher commented on GitHub (Nov 24, 2010):

Hehehe ok cool. I will rebase against the current master and make sure the code is correct so it's easier for you to review. I will do it on another branch in my repo perhaps. We can also generate a list of locale based month names like so :

month_names = [datetime.date(2001, i+1, 1).strftime('%B') for i in range(12)]

@v01d-cypher commented on GitHub (Nov 24, 2010): Hehehe ok cool. I will rebase against the current master and make sure the code is correct so it's easier for you to review. I will do it on another branch in my repo perhaps. We can also generate a list of locale based month names like so : <code>month_names = [datetime.date(2001, i+1, 1).strftime('%B') for i in range(12)]</code>
Author
Owner

@rg3 commented on GitHub (Nov 28, 2010):

That would be great. Just redo your changes (yes, using another branch to implement the feature is a great idea). I'll pull your changes when they are ready. I'll also notify you of any problems while testing it, so you can fix the code before I merge it. There's no need to generate the month names if parsing the date with strptime works.

Looking forward to your pull request.

@rg3 commented on GitHub (Nov 28, 2010): That would be great. Just redo your changes (yes, using another branch to implement the feature is a great idea). I'll pull your changes when they are ready. I'll also notify you of any problems while testing it, so you can fix the code before I merge it. There's no need to generate the month names if parsing the date with strptime works. Looking forward to your pull request.
Author
Owner

@Unknow0059 commented on GitHub (Oct 21, 2019):

It would be great if I could obtain this uploadDate info with a flag instead of having to download the video for its filename or parse the json with an external tool.
Similar to: #859

@Unknow0059 commented on GitHub (Oct 21, 2019): It would be great if I could obtain this _uploadDate_ info with a flag instead of having to download the video for its filename or parse the json with an external tool. Similar to: #859
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#8
No description provided.