youtube-dl
youtube-dl copied to clipboard
[pr0gramm] implement InfoExtractor, Resolves #31433
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
Implement extractor for Pr0gramm social media. Pr0gramm did not work with the generic IE fallback, because page content is loaded dynamically with JS. Basically: it "re-routes" regular urls, encountered by end users, to a compatibility-page served statically (provided by Pr0gramm), which does contain video information. From here, metadata and video information is extracted.
This is primarily meant for urls like https://pr0gramm.com/new/video/5466437
, https://pr0gramm.com/new/5466437
, but obviously also provides support for the static compatibility site (to where public urls are routed to): https://pr0gramm.com/static/5466437
Thanks to @dirkf for pointing me the right way on more than one occasion!
Output when running yt-dl with -v
➜ youtube-dl git:(pr0gramm-extractor) python -m youtube_dl -v https://pr0gramm.com/new/video/5466437
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://pr0gramm.com/new/video/5466437']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: d8b46090a
[debug] Python version 2.7.18 (CPython) - Darwin-21.6.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 5.1.2, ffprobe 5.1.2, rtmpdump 2.4
[debug] Proxy map: {}
[Pr0grammStatic] 5466437: Downloading webpage
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'http://img.pr0gramm.com/2022/12/21/62ae8aa5e2da0ebf.mp4'
[download] Destination: pr0gramm-5466437.mp4
[download] 0.0% of 13.70MiB at Unknown speed ETA Unk
[download] 0.0% of 13.70MiB at Unknown speed ETA Unk
[download] 100% of 13.70MiB in 00:0