Skip to content

Instantly share code, notes, and snippets.

@cashlion
Created January 24, 2020 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cashlion/279de14edcf380c7eaf3918d68ead4ce to your computer and use it in GitHub Desktop.
Save cashlion/279de14edcf380c7eaf3918d68ead4ce to your computer and use it in GitHub Desktop.
Oscar Pool Ballot Scraping + Google Form
[...document.querySelectorAll('.view-content')[1].querySelectorAll('.view-grouping')].map(row => {
let category = row.querySelector('.view-grouping-header').innerText;
let nominees = [...row.querySelectorAll('.views-row')].map(nom => nom.innerText.replace(/\n/g, ': '));
return {category, nominees};
}).map(row => {
let noms = row.nominees.join('","')
return `form.addMultipleChoiceItem()\n\t.setRequired(true)\n\t.setTitle('${row.category}')\n\t.setChoiceValues(["${noms}"])`
}).join("\n")
function createForm() {
var form = FormApp.create('Oscar 2020 Pool');
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('ACTOR IN A LEADING ROLE')
.setChoiceValues(["ANTONIO BANDERAS: Pain and Glory","LEONARDO DICAPRIO: Once upon a Time...in Hollywood","ADAM DRIVER: Marriage Story","JOAQUIN PHOENIX: Joker","JONATHAN PRYCE: The Two Popes"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('ACTOR IN A SUPPORTING ROLE')
.setChoiceValues(["TOM HANKS: A Beautiful Day in the Neighborhood","ANTHONY HOPKINS: The Two Popes","AL PACINO: The Irishman","JOE PESCI: The Irishman","BRAD PITT: Once upon a Time...in Hollywood"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('ACTRESS IN A LEADING ROLE')
.setChoiceValues(["CYNTHIA ERIVO: Harriet","SCARLETT JOHANSSON: Marriage Story","SAOIRSE RONAN: Little Women","CHARLIZE THERON: Bombshell","RENÉE ZELLWEGER: Judy"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('ACTRESS IN A SUPPORTING ROLE')
.setChoiceValues(["KATHY BATES: Richard Jewell","LAURA DERN: Marriage Story","SCARLETT JOHANSSON: Jojo Rabbit","FLORENCE PUGH: Little Women","MARGOT ROBBIE: Bombshell"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('ANIMATED FEATURE FILM')
.setChoiceValues(["HOW TO TRAIN YOUR DRAGON: THE HIDDEN WORLD: Dean DeBlois, Bradford Lewis and Bonnie Arnold","I LOST MY BODY: Jérémy Clapin and Marc du Pontavice","KLAUS: Sergio Pablos, Jinko Gotoh and Marisa Román","MISSING LINK: Chris Butler, Arianne Sutner and Travis Knight","TOY STORY 4: Josh Cooley, Mark Nielsen and Jonas Rivera"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('CINEMATOGRAPHY')
.setChoiceValues(["THE IRISHMAN: Rodrigo Prieto","JOKER: Lawrence Sher","THE LIGHTHOUSE: Jarin Blaschke","1917: Roger Deakins","ONCE UPON A TIME...IN HOLLYWOOD: Robert Richardson"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('COSTUME DESIGN')
.setChoiceValues(["THE IRISHMAN: Sandy Powell and Christopher Peterson","JOJO RABBIT: Mayes C. Rubeo","JOKER: Mark Bridges","LITTLE WOMEN: Jacqueline Durran","ONCE UPON A TIME...IN HOLLYWOOD: Arianne Phillips"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('DIRECTING')
.setChoiceValues(["THE IRISHMAN: Martin Scorsese","JOKER: Todd Phillips","1917: Sam Mendes","ONCE UPON A TIME...IN HOLLYWOOD: Quentin Tarantino","PARASITE: Bong Joon Ho"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('DOCUMENTARY (FEATURE)')
.setChoiceValues(["AMERICAN FACTORY: Steven Bognar, Julia Reichert and Jeff Reichert","THE CAVE: Feras Fayyad, Kirstine Barfod and Sigrid Dyekjær","THE EDGE OF DEMOCRACY: Petra Costa, Joanna Natasegara, Shane Boris and Tiago Pavan","FOR SAMA: Waad al-Kateab and Edward Watts","HONEYLAND: Ljubo Stefanov, Tamara Kotevska and Atanas Georgiev"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('DOCUMENTARY (SHORT SUBJECT)')
.setChoiceValues(["IN THE ABSENCE: Yi Seung-Jun and Gary Byung-Seok Kam","LEARNING TO SKATEBOARD IN A WARZONE (IF YOU'RE A GIRL): Carol Dysinger and Elena Andreicheva","LIFE OVERTAKES ME: John Haptas and Kristine Samuelson","ST. LOUIS SUPERMAN: Smriti Mundhra and Sami Khan","WALK RUN CHA-CHA: Laura Nix and Colette Sandstedt"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('FILM EDITING')
.setChoiceValues(["FORD V FERRARI: Michael McCusker and Andrew Buckland","THE IRISHMAN: Thelma Schoonmaker","JOJO RABBIT: Tom Eagles","JOKER: Jeff Groth","PARASITE: Yang Jinmo"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('INTERNATIONAL FEATURE FILM')
.setChoiceValues(["CORPUS CHRISTI: Poland","HONEYLAND: North Macedonia","LES MISÉRABLES: France","PAIN AND GLORY: Spain","PARASITE: South Korea"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('MAKEUP AND HAIRSTYLING')
.setChoiceValues(["BOMBSHELL: Kazu Hiro, Anne Morgan and Vivian Baker","JOKER: Nicki Ledermann and Kay Georgiou","JUDY: Jeremy Woodhead","MALEFICENT: MISTRESS OF EVIL: Paul Gooch, Arjen Tuiten and David White","1917: Naomi Donne, Tristan Versluis and Rebecca Cole"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('MUSIC (ORIGINAL SCORE)')
.setChoiceValues(["JOKER: Hildur Guðnadóttir","LITTLE WOMEN: Alexandre Desplat","MARRIAGE STORY: Randy Newman","1917: Thomas Newman","STAR WARS: THE RISE OF SKYWALKER: John Williams"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('MUSIC (ORIGINAL SONG)')
.setChoiceValues(["I CAN'T LET YOU THROW YOURSELF AWAY: from Toy Story 4; Music and Lyric by Randy Newman","(I'M GONNA) LOVE ME AGAIN: from Rocketman; Music by Elton John; Lyric by Bernie Taupin","I'M STANDING WITH YOU: from Breakthrough; Music and Lyric by Diane Warren","INTO THE UNKNOWN: from Frozen II; Music and Lyric by Kristen Anderson-Lopez and Robert Lopez","STAND UP: from Harriet; Music and Lyric by Joshuah Brian Campbell and Cynthia Erivo"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('BEST PICTURE')
.setChoiceValues(["FORD V FERRARI: Peter Chernin, Jenno Topping and James Mangold, Producers","THE IRISHMAN: Martin Scorsese, Robert De Niro, Jane Rosenthal and Emma Tillinger Koskoff, Producers","JOJO RABBIT: Carthew Neal, Taika Waititi and Chelsea Winstanley, Producers","JOKER: Todd Phillips, Bradley Cooper and Emma Tillinger Koskoff, Producers","LITTLE WOMEN: Amy Pascal, Producer","MARRIAGE STORY: Noah Baumbach and David Heyman, Producers","1917: Sam Mendes, Pippa Harris, Jayne-Ann Tenggren and Callum McDougall, Producers","ONCE UPON A TIME...IN HOLLYWOOD: David Heyman, Shannon McIntosh and Quentin Tarantino, Producers","PARASITE: Kwak Sin Ae and Bong Joon Ho, Producers"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('PRODUCTION DESIGN')
.setChoiceValues(["THE IRISHMAN: Production Design: Bob Shaw; Set Decoration: Regina Graves","JOJO RABBIT: Production Design: Ra Vincent; Set Decoration: Nora Sopková","1917: Production Design: Dennis Gassner; Set Decoration: Lee Sandales","ONCE UPON A TIME...IN HOLLYWOOD: Production Design: Barbara Ling; Set Decoration: Nancy Haigh","PARASITE: Production Design: Lee Ha Jun; Set Decoration: Cho Won Woo"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('SHORT FILM (ANIMATED)')
.setChoiceValues(["DCERA (DAUGHTER): Daria Kashcheeva","HAIR LOVE: Matthew A. Cherry and Karen Rupert Toliver","KITBULL: Rosana Sullivan and Kathryn Hendrickson","MEMORABLE: Bruno Collet and Jean-François Le Corre","SISTER: Siqi Song"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('SHORT FILM (LIVE ACTION)')
.setChoiceValues(["BROTHERHOOD: Meryam Joobeur and Maria Gracia Turgeon","NEFTA FOOTBALL CLUB: Yves Piat and Damien Megherbi","THE NEIGHBORS' WINDOW: Marshall Curry","SARIA: Bryan Buckley and Matt Lefebvre","A SISTER: Delphine Girard"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('SOUND EDITING')
.setChoiceValues(["FORD V FERRARI: Donald Sylvester","JOKER: Alan Robert Murray","1917: Oliver Tarney and Rachael Tate","ONCE UPON A TIME...IN HOLLYWOOD: Wylie Stateman","STAR WARS: THE RISE OF SKYWALKER: Matthew Wood and David Acord"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('SOUND MIXING')
.setChoiceValues(["AD ASTRA: Gary Rydstrom, Tom Johnson and Mark Ulano","FORD V FERRARI: Paul Massey, David Giammarco and Steven A. Morrow","JOKER: Tom Ozanich, Dean Zupancic and Tod Maitland","1917: Mark Taylor and Stuart Wilson","ONCE UPON A TIME...IN HOLLYWOOD: Michael Minkler, Christian P. Minkler and Mark Ulano"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('VISUAL EFFECTS')
.setChoiceValues(["AVENGERS: ENDGAME: Dan DeLeeuw, Russell Earl, Matt Aitken and Dan Sudick","THE IRISHMAN: Pablo Helman, Leandro Estebecorena, Nelson Sepulveda-Fauser and Stephane Grabli","THE LION KING: Robert Legato, Adam Valdez, Andrew R. Jones and Elliot Newman","1917: Guillaume Rocheron, Greg Butler and Dominic Tuohy","STAR WARS: THE RISE OF SKYWALKER: Roger Guyett, Neal Scanlan, Patrick Tubach and Dominic Tuohy"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('WRITING (ADAPTED SCREENPLAY)')
.setChoiceValues(["THE IRISHMAN: Screenplay by Steven Zaillian","JOJO RABBIT: Screenplay by Taika Waititi","JOKER: Written by Todd Phillips & Scott Silver","LITTLE WOMEN: Written for the screen by Greta Gerwig","THE TWO POPES: Written by Anthony McCarten"])
form.addMultipleChoiceItem()
.setRequired(true)
.setTitle('WRITING (ORIGINAL SCREENPLAY)')
.setChoiceValues(["KNIVES OUT: Written by Rian Johnson","MARRIAGE STORY: Written by Noah Baumbach","1917: Written by Sam Mendes & Krysty Wilson-Cairns","ONCE UPON A TIME...IN HOLLYWOOD: Written by Quentin Tarantino","PARASITE: Screenplay by Bong Joon Ho, Han Jin Won; Story by Bong Joon Ho"])
Logger.log('Published URL: ' + form.getPublishedUrl());
Logger.log('Editor URL: ' + form.getEditUrl());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment