Update youtube_dl/extractor/tvp.py

Add `txt_or_none()` shim
pull/32028/head
dirkf 2 years ago committed by GitHub
parent 6e827118cb
commit 4891480197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,6 +35,9 @@ 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):

Loading…
Cancel
Save