Skip to content

Commit

Permalink
Merge pull request #227 from erensertkaya/master
Browse files Browse the repository at this point in the history
Fix parsing without header
  • Loading branch information
norkunas authored Jan 14, 2024
2 parents a5ae26b + 37bc465 commit 3208903
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/YoutubeDl.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public function listSubs(string $url): array
$parsing = 'subtitles';
} elseif (str_contains($line, 'has no automatic captions') || str_contains($line, 'has no subtitles')) {
$parsing = null;
} elseif (str_contains($line, 'Language formats')) {
} elseif (str_contains($line, 'Language')) {
$header = $line;
} elseif ($parsing !== null) {
if ($parsing === 'auto_caption') {
Expand Down

0 comments on commit 3208903

Please sign in to comment.