I have been stuck on this for a few days now. I am attempting to create an app that is for the forum fightlockdown (its an MMA forum).
The area where I am running into trouble is on pages such as http://fightlockdown.com/forum/forumdisplay.php?f=1 where I would like to display each section in a table as a row but am having trouble grabbing only the sections i.e. UFC, The Ultimate Fighter, etc…
The closest I have been able to get is grabbing all of the anchor tags but there are obviously others on the page which could throw off my results if I don’t remove them from the returned Elements correctly.
I have not been able to figure out how to get the table to narrow down my results since as far as I can tell doc.select(“table.tborder”) does not yield any results and neither does doc.select(“td.alt1Active”).
Any help would be very much appreciated. Thanks in advance.
You are not very specific in what you are looking for, so I’ll throw some code out there and see if it’s what you are looking for.
On this page specifically, the divs you are trying to pull have one of two classes associated with them. This code selects those divs and iterates over them and then prints out the anchor tags in the divs.
Let me know if you need any more help.