Last active
May 6, 2019 02:37
-
-
Save AramZS/84d7b6988c3d272f14827350595b165b to your computer and use it in GitHub Desktop.
Find Out What Emotions The New York Times thinks you have about a story.
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
Object.keys(window.__preloadedData.initialState).forEach(function(key){ | |
if (key.match(/AdTargetingParam/)){ | |
// console.log(window.__preloadedData.initialState[key]); | |
if (window.__preloadedData.initialState[key].key.match(/emotion/)){ | |
console.log(window.__preloadedData.initialState[key].value); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example Result via https://www.nytimes.com/2019/05/05/automobiles/npr-morning-edition-theme-song.html :
Then
hope,optimistic,not_sadness,not_inthemoodtospend,not_hate,not_amused,not_adventurous,not_informed,not_fear