]> jfr.im git - yt-dlp.git/commitdiff
Revert 2e4cacd038b8543ccecfa9081dff6f656c979548
authorpukkandan <redacted>
Fri, 4 Mar 2022 14:23:18 +0000 (19:53 +0530)
committerpukkandan <redacted>
Fri, 4 Mar 2022 14:48:14 +0000 (20:18 +0530)
Closes #2923

yt_dlp/extractor/youtube.py

index 602d48e3cf9c364570a4414a96f30ab3694c2195..4e812af9924157dc7ee28077c09813f9293a866a 100644 (file)
@@ -240,13 +240,15 @@ def build_innertube_clients():
         base_client, *variant = client.split('_')
         ytcfg['priority'] = 10 * priority(base_client)
 
-        if variant == ['embedded']:
-            ytcfg['INNERTUBE_CONTEXT']['thirdParty'] = THIRD_PARTY
-            INNERTUBE_CLIENTS[f'{base_client}_agegate'] = agegate_ytcfg = copy.deepcopy(ytcfg)
+        if not variant:
+            INNERTUBE_CLIENTS[f'{client}_agegate'] = agegate_ytcfg = copy.deepcopy(ytcfg)
             agegate_ytcfg['INNERTUBE_CONTEXT']['client']['clientScreen'] = 'EMBED'
+            agegate_ytcfg['INNERTUBE_CONTEXT']['thirdParty'] = THIRD_PARTY
             agegate_ytcfg['priority'] -= 1
+        elif variant == ['embedded']:
+            ytcfg['INNERTUBE_CONTEXT']['thirdParty'] = THIRD_PARTY
             ytcfg['priority'] -= 2
-        elif variant:
+        else:
             ytcfg['priority'] -= 3