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

Creation Date / Uploaders Date #8

Closed
rg3 opened this issue Nov 1, 2010 · 13 comments
Closed

Creation Date / Uploaders Date #8

rg3 opened this issue Nov 1, 2010 · 13 comments
Labels

Comments

@rg3
Copy link
Collaborator

rg3 commented 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?

@rg3
Copy link
Collaborator Author

rg3 commented Nov 1, 2010

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

@rg3
Copy link
Collaborator Author

rg3 commented 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
Copy link
Collaborator Author

rg3 commented 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.

@v01d-cypher
Copy link

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?

@rg3
Copy link
Collaborator Author

rg3 commented 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.

@v01d-cypher
Copy link

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

@rg3
Copy link
Collaborator Author

rg3 commented 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
Copy link
Collaborator Author

rg3 commented 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.

@v01d-cypher
Copy link

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 (138b11f#commitcomment-201370). No probs with "upload_date" :-)

@rg3
Copy link
Collaborator Author

rg3 commented 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.

@v01d-cypher
Copy link

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)]

@rg3
Copy link
Collaborator Author

rg3 commented 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.

@ghost ghost mentioned this issue Aug 17, 2018
5 tasks
@Unknow0059
Copy link

Unknow0059 commented 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

tsukumijima pushed a commit to tsukumijima/youtube-dl that referenced this issue Sep 7, 2020
joedborg referenced this issue in joedborg/youtube-dl Nov 17, 2020
[pull] master from rg3:master
pukkandan added a commit to pukkandan/youtube-dl-1 that referenced this issue Jan 10, 2021
Authored by GreyAlien502
kobiburnley added a commit to kobiburnley/youtube-dl-1 that referenced this issue Jun 29, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants