Is there any PHP script to extract a youtube playlist like this playlist https://www.youtube.com/playlist?list=PLxm2pnc42iMLtB9qzzD_I10Jm2eV4P62F
Thanks in advance
You could use youtube api, first you need to register and the use the services, make a get from the url, like this
https://www.googleapis.com/youtube/v3/playlists?part=snippet&id=PLxm2pnc42iMLtB9qzzD_I10Jm2eV4P62F&key={YOUR_API_KEY}
you can see how to build a request in this page :
https://developers.google.com/youtube/v3/docs/playlists/list?hl=es
go to the bottom, there in ID place the channel ID, in this case
PLxm2pnc42iMLtB9qzzD_I10Jm2eV4P62F then in part put the part that you want, example : snippet and then press execute, that way you can retrieve info from youtube using the api.
Later, when you build code you need to put the api in the parameters, like the generated url that i posted where it says "YOUR_API_KEY"
NEW EDIT
OK, First i think you could read a little, in the link i gave you if you wanted to show more than 5 elements, you just have to modify the maxResults parameter, 50 its the max. In your case, if you want to retrieve every element of the list you can do it with this url (remember that you need to put you api key, a direct link WONT WORK) https://www.googleapis.com/youtube/v3/playlistItems?part=contentDetails&maxResults=50&playlistId=PLxm2pnc42iMLtB9qzzD_I10Jm2eV4P62F&key={YOUR_API_KEY}
OR, if you want to see it online you can do it by putting these parameters (see the image)
After that it will give you a result like this :
"kind": "youtube#playlistItemListResponse",
"etag": "\"sGDdEsjSJ_SnACpEvVQ6MtTzkrI/L_ZdoPe02Xer7WRpmCysh4qcWrE\"",
"pageInfo": {
"totalResults": 19,
"resultsPerPage": 50
},
"items": [
{
"kind": "youtube#playlistItem",
"etag": "\"sGDdEsjSJ_SnACpEvVQ6MtTzkrI/mW9gHJBweYJuJFbYzeei6ZtlUdU\"",
"id": "PLV9a8m_7AdmJdyG0E5T8TbcpscCxDcctnXWeFyhx35oU",
"contentDetails": {
"videoId": "SX7rbv0H1EU"
}
},
{ and so on with each element....
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments