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

upload_date appears not to work #102

Closed
miriam-e opened this issue Apr 9, 2011 · 1 comment
Closed

upload_date appears not to work #102

miriam-e opened this issue Apr 9, 2011 · 1 comment
Labels

Comments

@miriam-e
Copy link

miriam-e commented Apr 9, 2011

Downloading a video with
-o '%(upload_date)s'
in the options produces a video name with 'NA' where the uploader date should be.

I'm using youtube-dl v 2011.02.25c
on Linux kernel 2.6.33.2 with python 2.6

(By the way, I love this program. Kudos to you Ricardo.)

@miriam-e
Copy link
Author

I'm very much a python noobie so I'm kinda stumbling around in the dark here, but this is what I've found so far.

It looks like the upload date section of the code is searching for:
'id="eow-date".?>(.?)'
The regular expression is given as re.DOTALL so wildcards match newlines too.

An example from a video page is:

Apr 6, 2011

I worry about wildcards being greedy and gobbling up the longest possible string so I replaced the ".*" wildcards with "[^<]+" which only matches up til the next "<" character. The other thing I noticed is that the string "eow-date" doesn't always end there (as in my example above which is "eow-date-short", so I dropped the second double-quote.

Now it works! Yay!

tsukumijima pushed a commit to tsukumijima/youtube-dl that referenced this issue Sep 20, 2020
joedborg referenced this issue in joedborg/youtube-dl Nov 17, 2020
[pull] master from rg3:master
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

1 participant