]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/vidlii.py
[ie/orf:on] Improve extraction (#9677)
[yt-dlp.git] / yt_dlp / extractor / vidlii.py
index 69a75304e04a24c2302de8644486838c2c3fb6fe..44353b7fc45a19e6848dfa9364a57267a3ae652d 100644 (file)
@@ -1,8 +1,8 @@
 import re
 
 from .common import InfoExtractor
+from ..networking import HEADRequest
 from ..utils import (
-    HEADRequest,
     format_field,
     float_or_none,
     get_element_by_id,
@@ -70,6 +70,7 @@ def _real_extract(self, url):
             r'src\s*:\s*(["\'])(?P<url>(?:https?://)?(?:(?!\1).)+)\1',
             webpage) or []]
         for source in sources:
+            source = urljoin(url, source)
             height = int(self._search_regex(r'(\d+).mp4', source, 'height', default=360))
             if self._request_webpage(HEADRequest(source), video_id, f'Checking {height}p url', errnote=False):
                 formats.append({
@@ -77,7 +78,6 @@ def _real_extract(self, url):
                     'format_id': f'{height}p',
                     'height': height,
                 })
-        self._sort_formats(formats)
 
         title = self._search_regex(
             (r'<h1>([^<]+)</h1>', r'<title>([^<]+) - VidLii<'), webpage,