refactoring extractVideoIds