youtube-dl
youtube-dl copied to clipboard
[Loom] Add new extractor
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:
- [x] Searched the bugtracker for similar pull requests
- [x] Read adding new extractor tutorial
- [x] Read youtube-dl coding conventions and adjusted the code to meet them
- [x] Covered the code with tests (note that PRs without tests will be REJECTED)
- [x] Checked the code with flake8
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
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 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...🙈
@dstftw or @wongyiuhang can I help move this along?
@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 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...]
Hey folks, you were almost there!
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 ?
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
Hello, make sure not to forget about this.
Is anyone available to keep moving this along? Support for loom would be great
Is anyone available to keep moving this along? Support for loom would be great
It works perfectly
https://archive.org/details/Loom-6670e3eba3c84dc09ada8306c7138075
We just need to add a little more metadata from mine and we done
https://github.com/wongyiuhang/youtube-dl/pull/1
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/...
.