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
Closed

Also dl File Description Text #12

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

Comments

@rg3
Copy link
Collaborator

@rg3 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 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

@v01d-cypher v01d-cypher commented Nov 8, 2010

I will have a look at implementing this.

@Cightline
Copy link

@Cightline Cightline commented Mar 8, 2011

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

@orospakr
Copy link

@orospakr 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 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 orospakr commented Jul 6, 2011

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

@phihag
Copy link
Contributor

@phihag 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 phihag commented Sep 13, 2011

Implemented with --write-description.

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

@morbus 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
1 of 5 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

6 participants
You can’t perform that action at this time.