From bcb1c0a6ae7e3907ed4906ae01e86cde1eadfcd0 Mon Sep 17 00:00:00 2001 From: 50csent <32077344+50csent@users.noreply.github.com> Date: Fri, 29 Dec 2017 18:43:16 +0200 Subject: [PATCH 1/2] [pluralsight] Fixes #11118 --- youtube_dl/extractor/pluralsight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/pluralsight.py b/youtube_dl/extractor/pluralsight.py index 597b11218..80fdca123 100644 --- a/youtube_dl/extractor/pluralsight.py +++ b/youtube_dl/extractor/pluralsight.py @@ -171,7 +171,7 @@ class PluralsightIE(PluralsightBaseIE): for num, current in enumerate(subs): current = subs[num] start, text = ( - float_or_none(dict_get(current, TIME_OFFSET_KEYS)), + float_or_none(dict_get(current, TIME_OFFSET_KEYS, skip_false_values=False)), dict_get(current, TEXT_KEYS)) if start is None or text is None: continue From 9e198e794e20ccdff49d75ada98a6eb375385cca Mon Sep 17 00:00:00 2001 From: 50csent <32077344+50csent@users.noreply.github.com> Date: Fri, 29 Dec 2017 22:03:35 +0200 Subject: [PATCH 2/2] Update for requested change #11118 In case the first subtitle phrase starts at negative time, and the second subtitle phrase starts at 0.0 -- the first subtitle phrase would be skipped. This fix/update prevents that. --- youtube_dl/extractor/pluralsight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/pluralsight.py b/youtube_dl/extractor/pluralsight.py index 80fdca123..aacc5d4bb 100644 --- a/youtube_dl/extractor/pluralsight.py +++ b/youtube_dl/extractor/pluralsight.py @@ -176,7 +176,7 @@ class PluralsightIE(PluralsightBaseIE): if start is None or text is None: continue end = duration if num == len(subs) - 1 else float_or_none( - dict_get(subs[num + 1], TIME_OFFSET_KEYS)) + dict_get(subs[num + 1], TIME_OFFSET_KEYS, skip_false_values=False)) if end is None: continue srt += os.linesep.join(