diff options
author | sepro <sepro@sepr0.com> | 2024-11-04 01:33:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-04 01:33:21 +0100 |
commit | 197d0b03b6a3c8fe4fa5ace630eeffec629bf72c (patch) | |
tree | 577bda6784f8c1dbd9bcdf5e3a524a3c3c650f75 /yt_dlp/extractor/tbsjp.py | |
parent | b03267bf0675eeb8df5baf1daac7cf67840c91a5 (diff) |
[cleanup] Misc (#11347)
Closes #11361
Authored by: avagordon01, bashonly, grqz, Grub4K, seproDev
Co-authored-by: Ava Gordon <avagordon01@gmail.com>
Co-authored-by: bashonly <bashonly@protonmail.com>
Co-authored-by: N/Ame <173015200+grqz@users.noreply.github.com>
Co-authored-by: Simon Sawicki <contact@grub4k.xyz>
Diffstat (limited to 'yt_dlp/extractor/tbsjp.py')
-rw-r--r-- | yt_dlp/extractor/tbsjp.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/yt_dlp/extractor/tbsjp.py b/yt_dlp/extractor/tbsjp.py index 32f9cfbde..0d521f106 100644 --- a/yt_dlp/extractor/tbsjp.py +++ b/yt_dlp/extractor/tbsjp.py @@ -3,14 +3,12 @@ from ..networking.exceptions import HTTPError from ..utils import ( ExtractorError, clean_html, - get_element_text_and_html_by_tag, int_or_none, str_or_none, - traverse_obj, - try_call, unified_timestamp, urljoin, ) +from ..utils.traversal import find_element, traverse_obj class TBSJPEpisodeIE(InfoExtractor): @@ -64,7 +62,7 @@ class TBSJPEpisodeIE(InfoExtractor): self._merge_subtitles(subs, target=subtitles) return { - 'title': try_call(lambda: clean_html(get_element_text_and_html_by_tag('h3', webpage)[0])), + 'title': traverse_obj(webpage, ({find_element(tag='h3')}, {clean_html})), 'id': video_id, **traverse_obj(episode, { 'categories': ('keywords', {list}), |