From 10834f196dca983423bf5b90057540abf5c79c67 Mon Sep 17 00:00:00 2001 From: Jackson Humphrey Date: Wed, 13 Nov 2024 16:00:29 -0600 Subject: [PATCH] Removed deprecated constructions to satisfy DeprecationWarnings when running tests. Tests now pass. --- yt_dlp/extractor/alphaporno.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/yt_dlp/extractor/alphaporno.py b/yt_dlp/extractor/alphaporno.py index bfbe1f0401..3b3da37da0 100644 --- a/yt_dlp/extractor/alphaporno.py +++ b/yt_dlp/extractor/alphaporno.py @@ -50,7 +50,7 @@ def _real_extract(self, url): video_id = self._search_regex( r'video_id=(\d+)\b', webpage, 'video id') formats = [] - joined_url = urljoin(urlh.geturl(), rf'/get_file/\d.+?/{video_id}/{video_id}_(\w+)\..+?') + joined_url = urljoin(urlh.url, rf'/get_file/\d.+?/{video_id}/{video_id}_(\w+)\..+?') for video_url, res in re.findall(rf'''({joined_url})(?:'|"|\b)\s''', webpage): fmt = { 'format_id': f'f{res}', @@ -58,7 +58,6 @@ def _real_extract(self, url): } fmt.update(parse_resolution(res) or {}) formats.append(fmt) - self._sort_formats(formats) info['formats'] = formats title = (