I am trying to scrape some data from a page with a table based layout. So, to get some of the data I need to get something like 3rd table inside 2nd table inside 5th table inside 1st table inside body. I am trying to use enlive, but cannot figure out how to use nth-of-type and other selector steps. To make matters worse, the page in question has a single top level table inside the body, but (select data [:body :> :table]) returns 6 results for some reason. What the hell am I doing wrong?
Share
For
nth-of-type, does the following example help?No idea about the second issue. Your approach seems to work with a naive test:
Any chance of looking at your actual HTML?
Update: (in response to the comment)
Here’s another example where “the second
<p>inside the<div>inside the second<div>inside whatever” is returned: