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

RTVSLO fails on some links #8020

Closed
10 of 11 tasks
curya opened this issue Sep 3, 2023 · 1 comment · Fixed by #8131
Closed
10 of 11 tasks

RTVSLO fails on some links #8020

curya opened this issue Sep 3, 2023 · 1 comment · Fixed by #8131
Labels
patch-available There is patch available that should fix this issue. Someone needs to make a PR with it site-bug Issue with a specific website

Comments

@curya
Copy link

curya commented Sep 3, 2023

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Region

United States

Provide a description that is worded well enough to be understood

Yt-dlp works with this link:
https://365.rtvslo.si/arhiv/razred-zase/174376609
Fails with this link:
https://365.rtvslo.si/arhiv/razred-zase/148350750

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['-v', 'https://365.rtvslo.si/arhiv/razred-zase/148350750']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.07.06 [b532a3481] (pip)
[debug] Python 3.8.6 (CPython AMD64 64bit) - Windows-10-10.0.19041-SP0 (OpenSSL 1.1.1g  21 Apr 2020)
[debug] exe versions: ffmpeg 2023-08-23-git-5f5a1ccd04-full_build-www.gyan.dev (setts), ffprobe 2023-08-23-git-5f5a1ccd04-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.9.8, brotli-1.0.9, certifi-2019.11.28, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.1
[debug] Proxy map: {}
[debug] Loaded 1855 extractors
[debug] Using fake IP 188.198.54.65 (SI) as X-Forwarded-For
[rtvslo.si] Extracting URL: https://365.rtvslo.si/arhiv/razred-zase/148350750
[rtvslo.si] 148350750: Downloading JSON metadata
[rtvslo.si] 148350750: Downloading JSON metadata
ERROR: [rtvslo.si] 148350750: No video formats found!; 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
Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 1560, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 1709, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 1768, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 2732, in process_video_result
    self.raise_no_formats(info_dict)
  File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 1073, in raise_no_formats
    raise ExtractorError(msg, video_id=info['id'], ie=info['extractor'],
yt_dlp.utils.ExtractorError: [rtvslo.si] 148350750: No video formats found!; 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
@curya curya added site-bug Issue with a specific website triage Untriaged issue labels Sep 3, 2023
@bashonly bashonly removed the triage Untriaged issue label Sep 3, 2023
@bashonly
Copy link
Member

bashonly commented Sep 3, 2023

Needs something like this:

diff --git a/yt_dlp/extractor/rtvslo.py b/yt_dlp/extractor/rtvslo.py
index 05942b6b4..054174fe2 100644
--- a/yt_dlp/extractor/rtvslo.py
+++ b/yt_dlp/extractor/rtvslo.py
@@ -1,6 +1,7 @@
 from .common import InfoExtractor
 from ..utils import (
     ExtractorError,
+    int_or_none,
     parse_duration,
     traverse_obj,
     unified_timestamp,
@@ -114,16 +115,15 @@ def _real_extract(self, url):
                         else f.get('language'))
                 })
 
-        formats.extend(
-            {
-                'url': f['streams'][strm],
-                'ext': traverse_obj(f, 'mediaType', expected_type=str.lower),
-                'width': f.get('width'),
-                'height': f.get('height'),
-                'tbr': f.get('bitrate'),
-                'filesize': f.get('filesize'),
-            }
-            for strm in ('http', 'https')
-            for f in media.get('mediaFiles') or []
-            if traverse_obj(f, ('streams', strm))
-        )
+        for mediafile in traverse_obj(media, ('mediaFiles', lambda _, v: url_or_none(v['streams']['https']))):
+            formats.append(traverse_obj(mediafile, {
+                'url': ('streams', 'https'),
+                'ext': ('mediaType', {str.lower}),
+                'width': ('width', {int_or_none}),
+                'height': ('height', {int_or_none}),
+                'tbr': ('bitrate', {int_or_none}),
+                'filesize': ('filesize', {int_or_none}),
+            }))
+
+        for hls_url in traverse_obj(media, ('mediaFiles', ..., 'streams', 'hls_sec', {url_or_none})):
+            formats.extend(self._extract_wowza_formats(hls_url, v_id, skip_protocols=['smil']))

@bashonly bashonly added the patch-available There is patch available that should fix this issue. Someone needs to make a PR with it label Sep 3, 2023
bashonly added a commit that referenced this issue Sep 17, 2023
Closes #8020
Authored by: bashonly
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this issue Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-available There is patch available that should fix this issue. Someone needs to make a PR with it site-bug Issue with a specific website
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants