Simple functions to extract comments from youtube video and pick winners at random.
- Load the functions into PowerShell
. .\BookCompetition.ps1
- Collect the competition entries
$entries = Get-CompetitionEntries -videoId {the Id of the video you want} -apiKey {your youtube api key}
- Generate winners
# one winner
Get-CompetitionWinner -entries $entries
# five winners
Get-CompetitionWinner -entries $entries -winnerCount 5
# fifty winners
Get-CompetitionWinner -entries $entries -winnerCount 50