[lrt] fix extraction with empty tags(closes #20264)
authorRemita Amine <remitamine@gmail.com>
Mon, 16 Nov 2020 20:27:51 +0000 (21:27 +0100)
committerRemita Amine <remitamine@gmail.com>
Mon, 16 Nov 2020 20:28:12 +0000 (21:28 +0100)
youtube_dl/extractor/lrt.py

index a89434adb2b3a4af6913d154377c36e070c6a776..89d549858943afb62e02f912cf208b9faff55ff6 100644 (file)
@@ -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