Also dl File Description Text #11

Closed
opened 2026-02-20 22:23:13 -05:00 by deekerman · 9 comments
Owner

Originally created by @rg3 on GitHub (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?

Originally created by @rg3 on GitHub (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?
deekerman 2026-02-20 22:23:13 -05:00
  • closed this issue
  • added the
    request
    label
Author
Owner

@rg3 commented on GitHub (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.

@rg3 commented on GitHub (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.
Author
Owner

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

I will have a look at implementing this.

@v01d-cypher commented on GitHub (Nov 8, 2010): I will have a look at implementing this.
Author
Owner

@Cightline commented on GitHub (Mar 8, 2011):

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

@Cightline commented on GitHub (Mar 8, 2011): Hey rg3 is this the right spot to find the comments?: "video_webpage = urllib2.urlopen(request).read()"
Author
Owner

@orospakr commented on GitHub (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.

@orospakr commented on GitHub (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.
Author
Owner

@phihag commented on GitHub (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.

@phihag commented on GitHub (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.
Author
Owner

@orospakr commented on GitHub (Jul 6, 2011):

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

@orospakr commented on GitHub (Jul 6, 2011): I wonder if the YouTube Data API at all useful for this...
Author
Owner

@phihag commented on GitHub (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 commented on GitHub (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](https://raw.github.com/phihag/youtube-dl/master/youtube-dl) (which also includes blip.tv support). You can also apply the [diff](https://github.com/phihag/youtube-dl/commit/c6b55a8d4817a0818a1923db72b0f953ab80c0d4). [update:] Additionally, I added a `--write-description` flag. Set it to have a `.description` file written along with the video file itself. ([diff](https://github.com/phihag/youtube-dl/commit/8b95c38707b8e6c9f2ce6a754d77b2b8f458cc14)) I'd love to hear your feedback - does it work for you?
Author
Owner

@phihag commented on GitHub (Sep 13, 2011):

Implemented with --write-description.

@phihag commented on GitHub (Sep 13, 2011): Implemented with `--write-description`.
Author
Owner

@morbus commented on GitHub (Jul 11, 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.]

@morbus commented on GitHub (Jul 11, 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.]
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-ytdl-org#11
No description provided.