I am having trouble scraping the table of contents on wiki. I am making a simple web scraper for a personal project and I can't figure out how to scrape this data.
Here is my attempt at scraping the table of contents from any given wiki page
String contentOver = doc.select("#toclimit-3 > li").first().text();
HERE IS THE CODE FROM THE PAGE I want to scrape, how do I get just the word "Chronology"?:
<ul>
<li class="toclevel-1 tocsection-1"><a href="#Chronology"><span class="tocnumber">1</span> <span class="toctext">Chronology</span></a></li>