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

Also dl File Description Text #12

Closed
rg3 opened this issue Nov 1, 2010 · 9 comments · Fixed by #130
Closed

Also dl File Description Text #12

rg3 opened this issue Nov 1, 2010 · 9 comments · Fixed by #130
Labels

Comments

@rg3
Copy link
Collaborator

rg3 commented Nov 1, 2010

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

Would it be possible to download the File Description (Uploaders Comment) also and store it into a file named like the video with the extension txt or so?

@rg3
Copy link
Collaborator Author

rg3 commented Nov 1, 2010

No such a feature is currently planned, but I'll leave the issue open in case anyone is willing to submit a patch for it.

@v01d-cypher
Copy link

I will have a look at implementing this.

@Cightline
Copy link

Hey rg3 is this the right spot to find the comments?:
"video_webpage = urllib2.urlopen(request).read()"

@orospakr
Copy link

orospakr commented Jul 6, 2011

I've noticed that --get-description exists, but appears to get a truncated version. I hacked it in my own copy to print out the description text, truncated as it is, along with the URL so I can match 'em with the videos I downloaded in a separate run.

Also, it forces --silent and --simulate on.

@phihag
Copy link
Contributor

phihag commented Jul 6, 2011

youtube-dl returns the shortened title for youtube links because it parses <meta name="content"> with regular expressions. Instead, it should parse the document with an HTML parser (or fake on by removing <scripts> and then using an XML parser) and search for <p id="eow-description">, and return the textual contents of that element.

@orospakr
Copy link

orospakr commented Jul 6, 2011

I wonder if the YouTube Data API at all useful for this...

@phihag
Copy link
Contributor

phihag commented Jul 7, 2011

Retrieving the description over the Data API is trivial, but we'd have to request the web page anyway since the Data API does not give us the URL of the video. Also, we'd have to deal with a number of corner cases (authentication, age-restricted) twice then. Fortunately, HTML parsing in Python is really easy - if you have at least Python 2.6 (or lxml installed).

I implemented full youtube description retrieval in my fork (which also includes blip.tv support). You can also apply the diff.

[update:] Additionally, I added a --write-description flag. Set it to have a .description file written along with the video file itself. (diff)

I'd love to hear your feedback - does it work for you?

@phihag
Copy link
Contributor

phihag commented Sep 13, 2011

Implemented with --write-description.

@phihag phihag closed this as completed Sep 13, 2011
@morbus
Copy link

morbus commented Jul 12, 2012

@phihag: The --write-description was merged in, but it doesn't look like your revised "eow-description" lookup made it in. Worth reopening the issue for that? Was just something I was about to look into doing myself. [EDIT: Nevermind, looks like I was wrong. Now to figure out why I'm not getting the full description.]

@ghost ghost mentioned this issue Aug 17, 2018
5 tasks
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
kobiburnley added a commit to kobiburnley/youtube-dl-1 that referenced this issue Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants