You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`web`| Subs (rolling out), GVS | Only SABR formats available |
56
+
|`web_safari`| Subs (rolling out), GVS*| Same as `web`. *Provides HLS (m3u8) formats which do not require PO Token for GVS at this time. |
57
+
|`mweb`| GVS ||
58
+
|`tv`| Not required | All formats may have DRM if you request too much |
59
+
|`tv_simply`| Not required | Account cookies not supported |
60
+
|`tv_embedded`| Not required | Requires account cookies |
61
+
|`web_embedded`| Not required | Only embeddable videos available |
62
+
|`web_music`| GVS ||
63
+
|`web_creator`| GVS | Requires account cookies |
64
+
|`android`| GVS or Player | Account cookies not supported |
65
+
|`android_vr`| Not required | YouTube Kids videos are not available |
66
+
|`ios`| GVS or Player (rolling out) | Account cookies not supported |
67
+
68
+
For all clients:
69
+
- GVS PO Token is not required for YouTube Premium subscribers
70
+
- HLS live streams do not require a PO Token (excluding `ios` client)
68
71
69
72
You can select what client to use with the [`player_client` extractor argument](https://github.com/yt-dlp/yt-dlp#youtube).
70
73
71
74
## PO Token Provider Plugins
72
75
76
+
> [!TIP]
77
+
> Recommended
78
+
73
79
Manually fetching PO Tokens can be a tedious process. As an alternative, you can install a PO Token Provider plugin to handle fetching PO Tokens automatically.
74
80
75
81
### Featured Plugins
@@ -93,38 +99,24 @@ The same PO Token extraction method _may_ work with other web browser-based clie
93
99
94
100
### PO Token for GVS
95
101
96
-
The PO Token used for `web` GVS requests is tied to your YouTube session. It generated differently depending on if you are logged in to yt-dlp or not.
97
-
98
-
#### No account
99
-
100
-
1. Open [YouTube Music](https://music.youtube.com) or YouTube Embedded (e.g. https://www.youtube.com/embed/aqz-KE-bpKQ) in a browser. **Make sure you are not logged in to any account!**
101
-
2. Open any video
102
-
3. Open the developer console (F12), then go to the "Network" tab (click the `>>` button if you don't see it)
103
-
4. Filter requests by `googlevideo.com`
104
-
5. Click the video and play for a few seconds - requests to `googlevideo.com` should appear in the network tab
105
-
6. From the most recent `googlevideo.com` request, extract the `pot` query parameter value from the URL
106
-
7. Pass the PO Token for GVS to yt-dlp using `--extractor-args "youtube:player-client=default,mweb;po_token=mweb.gvs+PO_TOKEN_VALUE_HERE"` with cookies (`--cookies COOKIES_FILE` or `--cookies-from-browser`)
102
+
The PO Token used for `web` GVS requests is tied to your YouTube session, so you will need to provide cookies.
107
103
108
-
Although not recommended, you may also provide visitor data instead of cookies. Refer to [Passing Visitor Data without cookies](https://github.com/yt-dlp/yt-dlp/wiki/Extractors#passing-visitor-data-without-cookies).
104
+
1. Open **[YouTube Music](https://music.youtube.com)** in a browser.
105
+
2. Open the developer console (F12), then go to the "Network" tab (click the `>>` button if you don't see it)
106
+
3. Filter requests by `v1/player`
107
+
4. Play a video - a `player` request should appear in the network tab
108
+
5. From the most recent `player` request, extract the PO Token from `serviceIntegrityDimensions.poToken` field in the JSON request body
109
+
6. Pass the PO Token for GVS to yt-dlp using `--extractor-args "youtube:player-client=default,mweb;po_token=mweb.gvs+PO_TOKEN_VALUE_HERE"` with cookies (`--cookies COOKIES_FILE` or `--cookies-from-browser`)
109
110
110
-
#### With an account
111
-
112
-
1. Open [YouTube Music](https://music.youtube.com) in a browser, and log in with the user you are using with yt-dlp
113
-
2. Open any video
114
-
3. Follow steps 3-6 above
115
-
4. Pass the PO Token for GVS to yt-dlp using `--extractor-args "youtube:player-client=default,mweb;po_token=mweb.gvs+PO_TOKEN_VALUE_HERE"`[with your account cookies ](https://github.com/yt-dlp/yt-dlp/wiki/Extractors#exporting-youtube-cookies)
116
-
117
-
Addendum:
118
-
- If there is no `pot` parameter in the `googlevideo.com` URL, wait a few seconds for more requests to be made and check them.
119
-
- If there is a `sabr=1` query parameter in the `googlevideo.com` URL, then the PO Token is in the request body protobuf (and therefore is not easy to extract).
120
-
- This should not be the case for YouTube Music or YouTube Embedded - if so, please raise an issue, so we can update these docs.
111
+
If using an account, [refer to this guide on exporting account cookies](https://github.com/yt-dlp/yt-dlp/wiki/Extractors#exporting-youtube-cookies)
121
112
113
+
(Not recommended) If not using an account, you may also provide visitor data instead of cookies. Refer to [Passing Visitor Data without cookies](https://github.com/yt-dlp/yt-dlp/wiki/Extractors#passing-visitor-data-without-cookies).
122
114
123
115
### PO Token for Player or Subs
124
116
125
117
The PO Token for `web`/`mweb` Player or Subs requests is tied to the Video ID. This means you must generate a new PO Token for each video.
126
118
127
-
1. Open [YouTube Web](https://www.youtube.com) in a browser.
119
+
1. Open **[YouTube Web](https://www.youtube.com)** in a browser.
128
120
2. Open the developer console (F12), then go to the "Network" tab and filter by `v1/player`
129
121
3. Navigate to the video you want to download (e.g. using search - do not go to the video url directly as the page will refresh)
130
122
4. In the request payload JSON, find the PO Token at `serviceIntegrityDimensions.poToken` and save that value
@@ -172,3 +164,5 @@ These PO Tokens are only valid for a limited time (usually at least 12 hours), s
172
164
Web Tokens for player (and subtitles) requests are bound to the video ID the associated `/player` request is for. YouTube has only recently started generating these for some clients (e.g. `web`).
173
165
174
166
As of writing, some clients, such as `web_music` use a session-bound PO Token for player requests. This is likely to change.
167
+
168
+
For Android (and presumably iOS), the Player PO Token is bound to the user session, similar to GVS tokens. If a Player PO token is provided, the GVS PO token is not required.
0 commit comments