I'm trying to get specific sections from a webpage using Mathematica. I've started by importing the webpage, and getting the section "headers" that I want:
code = Import[ "http://www.slader.com/cheatsheet/e950aa2c-2ceb-4c6b-ac09-\ 5baa4ee99a35/", "CSV"] codeF = Map[ToString, Flatten[code]]; Select[codeF, #=="<section class=\"contents\">" &]
And I can also get the positions of these elements in the list. However, I want to get everything between that section header and it's closing
</section>. The only problem I'm having is things like this:
<section class="contents"> <section class="subcontents"> </section> </section>
So I can't simply search through until the next
</section>. How can I extract everything in a specified section?