Skip to content

Instantly share code, notes, and snippets.

@jhrr
Created February 12, 2021 18:26
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 jhrr/47b2a10e199afb52bae3c697326d5075 to your computer and use it in GitHub Desktop.
Save jhrr/47b2a10e199afb52bae3c697326d5075 to your computer and use it in GitHub Desktop.
Export MUBI lists
$('#multi-films .film-grid').children().map(function() {
var $this = $(this),
rank = $this.find('.list-film-position').text().trim(),
title = $this.find('.film-title').text().trim(),
dirYear = $this.find('.director-year').text().trim(),
re = dirYear.match(/^(.+), (\d+)$/),
dir = re ? re[1] : dirYear,
year = re ? re[2] : '';
return [rank, title, year, dir].join('\t');
}).get().join('\n');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment