]> jfr.im git - yt-dlp.git/commitdiff
[youtube] Show if video is embeddable in info
authorpukkandan <redacted>
Sat, 9 Jan 2021 15:59:58 +0000 (21:29 +0530)
committerpukkandan <redacted>
Sat, 9 Jan 2021 15:59:58 +0000 (21:29 +0530)
Closes https://github.com/ytdl-org/youtube-dl/issues/27730

youtube_dlc/extractor/youtube.py

index 9c9292a38899cb327a8dbacfd67764df7fc94b9c..44acb069a7a3519da5c83be9e452f0e3cca22a06 100644 (file)
@@ -1817,6 +1817,9 @@ def extract_unavailable_message():
         if not isinstance(video_info, dict):
             video_info = {}
 
+        playable_in_embed = try_get(
+            player_response, lambda x: x['playabilityStatus']['playableInEmbed'])
+
         video_details = try_get(
             player_response, lambda x: x['videoDetails'], dict) or {}
 
@@ -2538,6 +2541,7 @@ def decrypt_sig(mobj):
             'release_date': release_date,
             'release_year': release_year,
             'subscriber_count': subscriber_count,
+            'playable_in_embed': playable_in_embed,
         }