mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-10-03 07:41:27 +02:00
Compare commits
5 Commits
9b642d34b3
...
3b80453874
Author | SHA1 | Date | |
---|---|---|---|
|
3b80453874 | ||
|
2a4d549e52 | ||
|
82777cfc73 | ||
|
a0755795bd | ||
|
3f58b61022 |
|
@ -1,15 +1,14 @@
|
|||
import re
|
||||
from .common import InfoExtractor
|
||||
from ..utils import (
|
||||
encode_base_n,
|
||||
ExtractorError,
|
||||
encode_base_n,
|
||||
get_elements_by_class,
|
||||
int_or_none,
|
||||
join_nonempty,
|
||||
merge_dicts,
|
||||
parse_duration,
|
||||
str_to_int,
|
||||
url_or_none,
|
||||
get_elements_by_class,
|
||||
join_nonempty
|
||||
)
|
||||
|
||||
|
||||
|
@ -84,7 +83,7 @@ class EpornerIE(InfoExtractor):
|
|||
sources = video['sources']
|
||||
|
||||
formats = []
|
||||
av1 = True if len(get_elements_by_class("download-av1", webpage)) > 0 else False
|
||||
has_av1 = bool(get_elements_by_class('download-av1', webpage))
|
||||
for kind, formats_dict in sources.items():
|
||||
if not isinstance(formats_dict, dict):
|
||||
continue
|
||||
|
@ -110,10 +109,10 @@ class EpornerIE(InfoExtractor):
|
|||
'height': height,
|
||||
'fps': fps,
|
||||
})
|
||||
if av1:
|
||||
if has_av1:
|
||||
formats.append({
|
||||
'url': re.sub('(.*)(.mp4)', '\\1-av1\\2', src),
|
||||
'format_id': join_nonempty('AV1', format_id),
|
||||
'url': src.replace('.mp4', '-av1.mp4'),
|
||||
'format_id': join_nonempty('av1', format_id),
|
||||
'height': height,
|
||||
'fps': fps,
|
||||
'vcodec': 'av1',
|
||||
|
|
Loading…
Reference in New Issue
Block a user