![]() If you hover where the text is located in inspection mode, you’ll find that it’s wrapped in ‘scrolling-script-container’ tags. With any modern browser, you should be able to inspect the page to see the underlying code. Cool, let’s fire up the very first episode. ![]() Mighty Google told me that this website has GoT scripts online. How it works is that you feed it a URL, it reads the html, you locate which html tag/class contains the information you want to extract, and finally it lets you clean up the text by removing the html bits. rvest package is especially convenient to use. Nowadays it’s really easy to scrape interesting stuff online. Wear it like armor, and it can never be used to hurt you.’ It’s probably a Chinese proverb. A wise man once quipped: ‘Never forget what you are. ![]() I decided to go with the show because I’m a filthy casual fan. With GoT, there are two obvious avenues: full-text books or the show scripts. I intend to keep to the organic three-step structure I have developed lately in my posts: obtaining data, showcasing a package, and visualising the end result. Mandatory spoilers tag, the rest of the post contains (surprise) spoilers (although only up until the end of the sixth season). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |