Giter VIP home page Giter VIP logo

Comments (9)

rg3 avatar rg3 commented on June 19, 2024

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.

from youtube-dl.

v01d-cypher avatar v01d-cypher commented on June 19, 2024

I will have a look at implementing this.

from youtube-dl.

Cightline avatar Cightline commented on June 19, 2024

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

from youtube-dl.

orospakr avatar orospakr commented on June 19, 2024

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.

from youtube-dl.

phihag avatar phihag commented on June 19, 2024

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.

from youtube-dl.

orospakr avatar orospakr commented on June 19, 2024

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

from youtube-dl.

phihag avatar phihag commented on June 19, 2024

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?

from youtube-dl.

phihag avatar phihag commented on June 19, 2024

Implemented with --write-description.

from youtube-dl.

morbus avatar morbus commented on June 19, 2024

@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.]

from youtube-dl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.