Can you scrape a header for a table, and then include that header in each of the table row results?


1 comment

  • Avatar
    Ryan McNally

    Hi Marc!

    So with this site and what you want to accomplish, we have to use some manual XPath make this work. This solution will follow Part 2 and Part 3 of the Advanced XPath tutorial we have.

    On the page itself, we can inspect the source HTML and construct this row XPath to set the correct rows in the table as the rows:

    //tr[contains(@class,"staff_dgrd_item") or contains(@class,"staff_dgrd_alt")]

    With that, we can then update the row XPath in the product:

    Finally, we can then use manual xpath with preceding-sibling to capture the department:


    I've put together this fix at which you should be able to copy over to your account by clicking the Duplicate button.

    Hope that helps out!

Please sign in to leave a comment.