Created
January 30, 2016 13:53
-
-
Save andy0130tw/5f3fdfa5cb8afa18035e to your computer and use it in GitHub Desktop.
Fetch the URLs of a Facebook sticker pack! Also the very first gist of mine featuring ES6.
This file contains hidden or 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
// Before using, | |
// 1) add an ID (`ggg` in this case) to the container of the table of the sticker pack you want. | |
// 2) The static ones are cached unless the animated ones are needed so you must move your cursor through all the stickers. | |
// Hint: The URLs can be fed into DownloadThemAll! or something else. | |
Array.from(document.querySelectorAll("#ggg ._5r8i")) | |
.map( x=>x.style.backgroundImage | |
.match(/https[^"]+/)[0] | |
.replace(/(s|p)\d+x\d+/, "") ) | |
.join("\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment