Youtube + Selenium ChromeDriver (Python) - How to know when a video ends?
You can execute javascript API in context of youtube video page:
youtubePlayer = document.getElementById("movie_player");
youtubePlayer.getPlayerState();
So according to https://developers.google.com/youtube/js_api_reference?csw=1
state == 0
is when a video has ended
You can add an executor in a loop checking the state every N seconds.