[massengeschmacktv] Update extractor #7813
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IMPORTANT: PRs without the template will be CLOSED
Description of your pull request and other information
The current implementation of the Massengeschmack.tv extractor fails to get the title of the video.
From the regex, it seems previously the title was contained within an
h3
element, while now the following HTML is used on the site:This pull requests updates the regex to work with the current HTML. Additionally the test case was updated, to reflect changes to the expected values.
Logs
Before
[debug] Command-line config: ['--cookies', 'cookies.txt', '-vU', 'https://massengeschmack.tv/play/fktvplus41'] [debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8 [debug] yt-dlp version stable@2023.07.06 [b532a34] (pip) [debug] Python 3.11.4 (CPython arm64 64bit) - macOS-14.0-arm64-arm-64bit (OpenSSL 3.1.2 1 Aug 2023) [debug] exe versions: ffmpeg 6.0 (setts), ffprobe 6.0, phantomjs 2.1.1, rtmpdump 2.4 [debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.07.22, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3 [debug] Proxy map: {} [debug] Loaded 1855 extractors [debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest Available version: stable@2023.07.06, Current version: stable@2023.07.06 yt-dlp is up to date (stable@2023.07.06) [massengeschmack.tv] Extracting URL: https://massengeschmack.tv/play/fktvplus41 [massengeschmack.tv] fktvplus41: Downloading webpage ERROR: [massengeschmack.tv] fktvplus41: Unable to extract title; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U File "/opt/homebrew/Cellar/yt-dlp/2023.7.6_1/libexec/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 710, in extract ie_result = self._real_extract(url) ^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/yt-dlp/2023.7.6_1/libexec/lib/python3.11/site-packages/yt_dlp/extractor/massengeschmacktv.py", line 32, in _real_extract title = clean_html(self._html_search_regex( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/yt-dlp/2023.7.6_1/libexec/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 1294, in _html_search_regex res = self._search_regex(pattern, string, name, default, fatal, flags, group) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/yt-dlp/2023.7.6_1/libexec/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 1258, in _search_regex raise RegexNotFoundError('Unable to extract %s' % _name) ```After
[debug] Command-line config: ['--cookies', 'cookies.txt', '-vU', 'https://massengeschmack.tv/play/fktvplus41'] [debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8 [debug] yt-dlp version stable@2023.07.06 [b532a34] (pip) [debug] Python 3.11.4 (CPython arm64 64bit) - macOS-14.0-arm64-arm-64bit (OpenSSL 3.1.2 1 Aug 2023) [debug] exe versions: ffmpeg 6.0 (setts), ffprobe 6.0, phantomjs 2.1.1, rtmpdump 2.4 [debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2023.07.22, mutagen-1.46.0, sqlite3-2.6.0, websockets-11.0.3 [debug] Proxy map: {} [debug] Loaded 1855 extractors [debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest Available version: stable@2023.07.06, Current version: stable@2023.07.06 yt-dlp is up to date (stable@2023.07.06) [massengeschmack.tv] Extracting URL: https://massengeschmack.tv/play/fktvplus41 [massengeschmack.tv] fktvplus41: Downloading webpage [massengeschmack.tv] fktvplus41: Downloading m3u8 information [debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id [debug] Default format spec: bestvideo*+bestaudio/best [info] fktvplus41: Downloading 1 format(s): hls-2465 [debug] Invoking hlsnative downloader on "https://dla3.massengeschmack.tv/stream/95876ce2afc8f7145a53fd765cdb2bcb/64d6b477/fktvplus41/5750k/fktvplus41_.m3u8" [hlsnative] Downloading m3u8 manifest [hlsnative] Total fragments: 67 [download] Destination: FKTV PLUS #41 [fktvplus41].mp4 [download] 100% of 195.62MiB in 00:00:20 at 9.57MiB/s [debug] ffprobe command line: ffprobe -hide_banner -show_format -show_streams -print_format json 'file:FKTV PLUS #41 [fktvplus41].mp4' [debug] ffmpeg command line: ffprobe -show_streams 'file:FKTV PLUS #41 [fktvplus41].mp4' [FixupM3u8] Fixing MPEG-TS in MP4 container of "FKTV PLUS #41 [fktvplus41].mp4" [debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:FKTV PLUS #41 [fktvplus41].mp4' -map 0 -dn -ignore_unknown -c copy -f mp4 -bsf:a aac_adtstoasc -movflags +faststart 'file:FKTV PLUS #41 [fktvplus41].temp.mp4'Fixes [issue not reported yet]
Template
Before submitting a pull request make sure you have:
In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:
What is the purpose of your pull request?
Copilot Summary
🤖 Generated by Copilot at fc04e06
Summary
🛠️🖼️✅
Improved an extractor for a German media website and updated its test case.
Walkthrough
MassengeschmackTVIE
extractor to match the new title format, video hash, and thumbnail URL (link)