lolada 1 Posted November 15, 2017 Report Share Posted November 15, 2017 Hello guys i need to scrape atribute, want to search for innertext "insane" and give the result as "online2". my problem is that there is one class inside another one. so i always get answer "player" instead of "online2" any idea how i can do it? website code: <td class="player"> <img src="img/x.gif" class="online2"> <a href="/spieler.php?uid=5600">Insane</a> </td> i'm using this code: set(#test, $scrape attribute(<innertext=" Insane">, "class"), "Global") Quote Link to post Share on other sites
HelloInsomnia 1103 Posted November 15, 2017 Report Share Posted November 15, 2017 Few things wrong here, first there appears to be ea space before "Insane" So you should change it to be this: set(#test,$scrape attribute(<innertext="Insane">,"class"),"Global") And the second issue is that there is no class for that tag, so even if you target it properly you won't scrape anything. You seem to want to get the tag before it, and this is probably possible but given your code its hard to say. I would need to see more of the page to be able to properly target it. Quote Link to post Share on other sites
lolada 1 Posted November 15, 2017 Author Report Share Posted November 15, 2017 hello i tried your code, but still no, didnt scrape anything any idea? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted November 16, 2017 Report Share Posted November 16, 2017 Edit: I replied to your pm. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.