1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-04 19:44:33 -04:00

[skeb] Add extractor (#1916)

Fixes: https://github.com/ytdl-org/youtube-dl/issues/30287
Authored by: nao20010128nao
This commit is contained in:
The Hatsune Daishi
2021-12-09 20:40:52 +09:00
committed by GitHub
parent 1619836cb7
commit 2814f12ba4
3 changed files with 153 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ import time
import traceback
import xml.etree.ElementTree
import zlib
import mimetypes
from .compat import (
compat_HTMLParseError,
@@ -4715,6 +4716,14 @@ def mimetype2ext(mt):
return subtype.replace('+', '.')
def ext2mimetype(ext_or_url):
if not ext_or_url:
return None
if '.' not in ext_or_url:
ext_or_url = f'file.{ext_or_url}'
return mimetypes.guess_type(ext_or_url)[0]
def parse_codecs(codecs_str):
# http://tools.ietf.org/html/rfc6381
if not codecs_str: