1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-22 16:44:32 +01:00

Added check for robot detection on player page

This commit is contained in:
Ben Bryant 2020-04-20 10:00:45 -07:00
parent ad60ff4700
commit dae0247122

View File

@ -162,6 +162,10 @@ class FunimationIE(InfoExtractor):
text_tracks_json_string = self._search_regex(
r'"textTracks": (\[{.+?}\])',
player_page, 'player data', default='')
if not text_tracks_json_string:
# Funimation player page unavailable due to robot detection.
# Don't warn so that unit tests still pass this step.
return {}
text_tracks = self._parse_json(
text_tracks_json_string, display_id, js_to_json, fatal=False) or []
subtitles = {}