How to select nth element of particular type in enlive?

Posted by Mad Wombat on Stack Overflow See other posts from Stack Overflow or by Mad Wombat
Published on 2010-04-23T01:53:41Z Indexed on 2010/04/23 2:03 UTC
Read the original article Hit count: 287

Filed under:

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?

© Stack Overflow or respective owner

Related posts about clojure