Просмотр исходного кода

[qqmusic] Do not capture braced text from the middle of the string

Sergey M․ 10 лет назад
Родитель
Сommit
d4cd06138c
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      youtube_dl/extractor/qqmusic.py

+ 1 - 1
youtube_dl/extractor/qqmusic.py

@@ -114,7 +114,7 @@ class QQMusicIE(InfoExtractor):
 
         actual_lrc_lyrics = ''.join(
             line + '\n' for line in re.findall(
-                r'(\[[0-9]{2}:[0-9]{2}\.[0-9]{2,}\][^\n]*|\[[^\]]*\])', lrc_content))
+                r'(?m)^(\[[0-9]{2}:[0-9]{2}\.[0-9]{2,}\][^\n]*|\[[^\]]*\])', lrc_content))
 
         info_dict = {
             'id': mid,