Created
February 12, 2021 18:26
-
-
Save jhrr/47b2a10e199afb52bae3c697326d5075 to your computer and use it in GitHub Desktop.
Export MUBI lists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#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