youtube-dl icon indicating copy to clipboard operation
youtube-dl copied to clipboard

[Loom] Add new extractor

Open wongyiuhang opened this issue 4 years ago • 14 comments

Please follow the guide below

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

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • [x] I am the original author of this code and I am willing to release it under Unlicense
  • [ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • [ ] Bug fix
  • [ ] Improvement
  • [x] New extractor
  • [ ] New feature

Description of your pull request and other information

In response to a site request #27957, this new extractor is written for loom.com.

Closes #27957

wongyiuhang avatar Feb 01 '21 08:02 wongyiuhang

This has been already merged ?

I try to download a video here. When I try with the MPD link I can detect, YTDL returns a 403 error.

Are you able to download it ?

Fred-Vatin avatar Mar 18 '21 20:03 Fred-Vatin

This has been already merged ?

I try to download a video here. When I try with the MPD link I can detect, YTDL returns a 403 error.

Are you able to download it ?

This PR has not completed the code reviewing yet. Also, I have yet implemented the *.mpd support yet...🙈

wongyiuhang avatar Mar 19 '21 04:03 wongyiuhang

@dstftw or @wongyiuhang can I help move this along?

rememberlenny avatar Sep 24 '21 19:09 rememberlenny

@dstftw or @wongyiuhang can I help move this along?

Yes, of course. I'm sorry for holding the pull request. Is there anything that I need to do? 👀

wongyiuhang avatar Sep 25 '21 06:09 wongyiuhang

@wongyiuhang since the PR has not yet been merged I have tried to git clone your repo and checkout to 'loom' branch. Then I have installed with 'pip3 install -e .' but downloading the link above does not work. I am getting the following error:

ERROR: Unsupported URL: https://www.loom.com/share/384b27b953714dc19aba4768643038bd

This is my youtube-dl -v:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.02.10
[debug] Git HEAD: 360d5f0da
[debug] Python version 3.9.7 (CPython) - Linux-5.15.0-1-MANJARO-x86_64-with-glibc2.33
[debug] exe versions: ffmpeg 4.4, ffprobe 4.4, rtmpdump 2.4
[debug] Proxy map: {}
Usage: youtube-dl [OPTIONS] URL [URL...]

cellarpub avatar Nov 06 '21 07:11 cellarpub

Hey folks, you were almost there!

mysticaltech avatar Jan 31 '22 21:01 mysticaltech

I suggest an optimisation, which is to use the transcoded_url if it exits, and then the raw_url if not and then do the hls/dash stitching.

Here's how to the *.mpd @wongyiuhang

            if ext == 'mpd':
                credentials = compat_urllib_parse_urlencode(part_credentials)
                mpd_formats = self._extract_mpd_formats(
                    url, video_id)
                for item in mpd_formats:
                    for f in item['fragments']:
                        f['path'] += '?' + credentials
                        self.to_screen(f)
                    item['protocol'] = 'http_dash_segments'
                    item['url'] += '?' + credentials
                    item['ext'] = 'mp4'
                    item['format_id'] = 'dash-' + str(item.get('height', 0))
                for i in range(len(mpd_formats)):
                    formats.insert(
                        (-1, len(formats))[i == len(mpd_formats) - 1],
                        mpd_formats[i])

I'm happy to give a hand, what else is needed to get this one through ? @dstftw

Anyone else that we can tag ?

coolbaluk avatar Feb 02 '22 16:02 coolbaluk

I checked out @wongyiuhang's code from his loom branch and it doesn't work (anymore). Merely downloads a 4kb mp4. Somebody on Reddit suggests having to download the manifest.

Also, embedded URLs are invalid currently and look like this https://www.loom.com/embed/1ae0b5c204b14f5881f0a826cbc7b3b9

alfonsrv avatar Apr 03 '22 16:04 alfonsrv

Hello, make sure not to forget about this.

upintheairsheep avatar Nov 08 '22 17:11 upintheairsheep

Is anyone available to keep moving this along? Support for loom would be great

ryanhugh avatar Feb 26 '23 20:02 ryanhugh

Is anyone available to keep moving this along? Support for loom would be great

It works perfectly

upintheairsheep avatar Feb 27 '23 03:02 upintheairsheep

https://archive.org/details/Loom-6670e3eba3c84dc09ada8306c7138075

upintheairsheep avatar Feb 27 '23 03:02 upintheairsheep

We just need to add a little more metadata from mine and we done

upintheairsheep avatar Feb 27 '23 03:02 upintheairsheep

https://github.com/wongyiuhang/youtube-dl/pull/1

upintheairsheep avatar Feb 27 '23 03:02 upintheairsheep

The first test for LoomFolderIE is giving 404 on JSON download. The API URL with folders/.../by_name seems not to be supported now. But the folder structure can be traversed with the folders/....

dirkf avatar Jun 02 '23 04:06 dirkf