Removed deprecated constructions to satisfy DeprecationWarnings when running tests. Tests now pass.

This commit is contained in:
Jackson Humphrey 2024-11-13 16:00:29 -06:00
parent e719bf1fbb
commit 10834f196d

View file

@ -50,7 +50,7 @@ class AlphaPornoIE(InfoExtractor):
video_id = self._search_regex( video_id = self._search_regex(
r'video_id=(\d+)\b', webpage, 'video id') r'video_id=(\d+)\b', webpage, 'video id')
formats = [] 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): for video_url, res in re.findall(rf'''({joined_url})(?:'|"|\b)\s''', webpage):
fmt = { fmt = {
'format_id': f'f{res}', 'format_id': f'f{res}',
@ -58,7 +58,6 @@ class AlphaPornoIE(InfoExtractor):
} }
fmt.update(parse_resolution(res) or {}) fmt.update(parse_resolution(res) or {})
formats.append(fmt) formats.append(fmt)
self._sort_formats(formats)
info['formats'] = formats info['formats'] = formats
title = ( title = (