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

Extract subs from OpenLoad videos #10625

Closed
4 tasks
bishiboosh opened this issue Sep 12, 2016 · 6 comments
Closed
4 tasks

Extract subs from OpenLoad videos #10625

bishiboosh opened this issue Sep 12, 2016 · 6 comments
Assignees

Comments

@bishiboosh
Copy link

bishiboosh commented Sep 12, 2016

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.09.11.1. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • [X ] I've verified and I assure that I'm running youtube-dl 2016.09.11.1

Before submitting an issue make sure you have:

  • [X ] At least skimmed through README and most notably FAQ and BUGS sections
  • [X ] Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • [X ] Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):


Description of your issue, suggested solution and other information

OpenLoad videos can have subtitle files, but they are not returned when using --list-subs. I did not manage to find where the file is specified in the page, or in the Javascript, but when observing the page with web tools, a .vtt file is clearly downloaded, with a specific name scheme.

I think what there is to do is to find how this name scheme work, in order to download the subtitle file.

Example of subtitle files corresponding to the two videos specified above :

@bishiboosh
Copy link
Author

bishiboosh commented Sep 19, 2016

Ok, I found where the vtt comes from. In the page HTML, we can see :
<track kind="captions" src="https://thumb.oloadcdn.net/subtitle/jzsMDm13XWE/tYAtG45F4As.vtt" srclang="fr" label="French" default />

I don't really know Python, so I don't think I can provide the real code, but I think finding the track tag in the page and parsing subtitle info from here should do the trick.

Just for info, there appears to be more track tags in the source, but only the one(s) with the real subtitle will have the src attribute specified.

@yan12125
Copy link
Collaborator

Steven Universe is a copyrighted product of Cartoon Network. Do you have other examples with subtitles?

@bishiboosh
Copy link
Author

You can use https://openload.co/embed/rjC09fkPLYs which is an upload of http://lachuteduneplume.free.fr/?-English-, an open-source movie. It contains english subtitles, which can be found as seen previously with the track tag

@bishiboosh
Copy link
Author

Do you need me to remove the example links in the first message to avoid copyright issues ?

@yan12125
Copy link
Collaborator

Thanks for the new example.

Do you need me to remove the example links in the first message to avoid copyright issues ?

Yeah it should be better to do so.

@yan12125 yan12125 self-assigned this Sep 23, 2016
yan12125 pushed a commit that referenced this issue Sep 24, 2016
Ref: #10625

In a strict sense, <track>s with kind=captions are not subtitles. [1]
openload misuses this attribute, and I guess there will be more
examples, so I add it to common.py.

Also allow extracting information for subtitles-only <video> or <audio>
tags, which is the case of openload.

[1] https://www.w3.org/TR/html5/embedded-content-0.html#attr-track-kind
@yan12125
Copy link
Collaborator

Subtitles on openload will be recognized in the next version. Thanks for the report and the example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants