1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-11-20 08:25:21 +00:00

[extractor] Improve _generic_title

This commit is contained in:
pukkandan
2022-10-31 17:35:20 +05:30
parent 682b4524bf
commit 62b8dac490
16 changed files with 21 additions and 34 deletions

View File

@@ -303,9 +303,7 @@ class ArteTVCategoryIE(ArteTVBaseIE):
if any(ie.suitable(video) for ie in (ArteTVIE, ArteTVPlaylistIE, )):
items.append(video)
title = (self._og_search_title(webpage, default=None)
or self._html_search_regex(r'<title\b[^>]*>([^<]+)</title>', default=None))
title = strip_or_none(title.rsplit('|', 1)[0]) or self._generic_title(url)
title = strip_or_none(self._generic_title('', webpage, default='').rsplit('|', 1)[0]) or None
return self.playlist_from_matches(items, playlist_id=playlist_id, playlist_title=title,
description=self._og_search_description(webpage, default=None))