Created
October 31, 2019 20:00
-
-
Save nt1m/3c686a52c7995d46953c34f5204816ac to your computer and use it in GitHub Desktop.
Scrapes criterion.com
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
copy([...$$("#gridview .gridFilm")].map(x => { | |
let comma = x.querySelector(".g-country__comma"); | |
if (comma && getComputedStyle(comma).display == "none") { | |
comma.remove(); | |
} | |
return { | |
spine: x.querySelector(".g-spine").textContent.trim(), | |
img: x.querySelector(".g-img > img").src.trim(), | |
title: x.querySelector(".g-title").textContent.trim(), | |
href: x.querySelector(".g-title > a").href.trim(), | |
director: x.querySelector(".g-director").textContent.trim(), | |
country: x.querySelector(".g-country").textContent.trim(), | |
year: x.querySelector(".g-year").textContent.trim() | |
}; | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment