浏览代码

[lrt] fix extraction with empty tags(closes #20264)

Remita Amine 5 年之前
父节点
当前提交
91dcde8a38
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/extractor/lrt.py

+ 1 - 1
youtube_dl/extractor/lrt.py

@@ -61,7 +61,7 @@ class LRTIE(InfoExtractor):
         json_ld_data = self._search_json_ld(webpage, video_id)
 
         tags = []
-        for tag in media.get('tags', []):
+        for tag in (media.get('tags') or []):
             tag_name = tag.get('name')
             if not tag_name:
                 continue