1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-18 00:05:46 +00:00

moved txt_or_none outside if statement

This commit is contained in:
bibiak 2023-10-02 14:13:50 +00:00
parent efee229d66
commit f5dd875a02

View file

@ -21,6 +21,9 @@ from ..utils import (
)
def txt_or_none(v, default=None):
return default if v is None else (compat_str(v).strip() or default)
if not hasattr(InfoExtractor, '_match_valid_url'):
import sys
@ -35,9 +38,6 @@ if not hasattr(InfoExtractor, '_match_valid_url'):
RegexNotFoundError,
)
def txt_or_none(v, default=None):
return default if v is None else (compat_str(v).strip() or default)
BaseIE = InfoExtractor
class InfoExtractor(BaseIE):