sazuka 0 Posted February 5, 2016 Report Share Posted February 5, 2016 (edited) I am trying to scrape the passwords. 5 different Passwords and save each password into each owns varialble.I tried scraping with wildcard but it scrapes all passwords at once.. because the innerhtml are very similar<innerhtml=w"<strong>Password</strong>: *"> doesnt work Below is the Html code <p>mysite.com</p><p><strong>Username:</strong> mysite</p><p><strong>Password</strong>: Pass1</p><p><strong>Username:</strong><span class="email">email1@email.com</span></p><p><strong>Password</strong>: epass1</p><p>or:</p><p><strong>Username:</strong><span class="email">email2@email.com</span></p><p><strong>Password</strong>: epass2</p><p>or:</p><p><strong>Username:</strong><span class="email">email3@email.com</span></p><p><strong>Password</strong>: epass3</p><p>or:</p><p><strong>Username:</strong><span class="email">email4@email.com</span></p><p><strong>Password</strong>: epass4</p> Edited February 5, 2016 by sazuka Quote Link to post Share on other sites
deliter 203 Posted February 5, 2016 Report Share Posted February 5, 2016 my regex sucks but this works add list to list(%passwords,$find regular expression($replace regular expression($find regular expression($scrape attribute(<tagname="p">,"innertext"),"Password:.+"),"Password: ",""),".+"),"Delete","Global") Quote Link to post Share on other sites
HelloInsomnia 1103 Posted February 5, 2016 Report Share Posted February 5, 2016 Here's another way. add list to list(%passwords,$find regular expression($scrape attribute(<tagname="p">,"outerhtml"),"(?<=Password\\<\\/strong\\>\\:\\s).*?(?=\\<\\/p\\>)"),"Delete","Global") Quote Link to post Share on other sites
deliter 203 Posted February 5, 2016 Report Share Posted February 5, 2016 Another way is using the advanced element selector with scrape attribute,although this can be a bit untrustworthy as if a password is say Password1 I dont know if it would work,but very easy to cook up a quick scraper alert($scrape attribute(<(after="Password" AND tagname="p")>,"innertext")) Quote Link to post Share on other sites
sazuka 0 Posted February 6, 2016 Author Report Share Posted February 6, 2016 Thanks guys for the help! 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.