Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

README documentation for #271 #316

Merged
merged 1 commit into from
Aug 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,29 @@ playlist('https://www.youtube.com/playlist?list=PLEFA9E9D96CB7F807')

```

Note node-youtube-dl does not currently support playlist urls with the "list" format:
```
https://www.youtube.com/watch?v=<video-id>&list=<playlist id>
```
Please use instead the equivalent "playlist" format as the example below:
```
https://www.youtube.com/playlist?list=<playlist id>
```
The following snippet could be of use when making this format conversion.
```
function toSupportedFormat(url) {
if (url.includes("list=")) {
var playlistId = url.substring(url.indexOf('list=') + 5);
return "https://www.youtube.com/playlist?list=" + playlistId;
}
return url;
}

var url = "https://www.youtube.com/watch?v=shF8Sv-OswM&list=PLzIUZKHPb1HbqsPMIFdE0My54iektZrNU"
url = toSupportedFormat(url);
console.log(url) // "https://www.youtube.com/playlist?list=PLzIUZKHPb1HbqsPMIFdE0My54iektZrNU"
```

### Getting the list of extractors

``` js
Expand Down