moved txt_or_none outside if statement
This commit is contained in:
parent
efee229d66
commit
f5dd875a02
@ -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'):
|
if not hasattr(InfoExtractor, '_match_valid_url'):
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
@ -35,9 +38,6 @@ if not hasattr(InfoExtractor, '_match_valid_url'):
|
|||||||
RegexNotFoundError,
|
RegexNotFoundError,
|
||||||
)
|
)
|
||||||
|
|
||||||
def txt_or_none(v, default=None):
|
|
||||||
return default if v is None else (compat_str(v).strip() or default)
|
|
||||||
|
|
||||||
BaseIE = InfoExtractor
|
BaseIE = InfoExtractor
|
||||||
|
|
||||||
class InfoExtractor(BaseIE):
|
class InfoExtractor(BaseIE):
|
||||||
|
Loading…
Reference in New Issue
Block a user