ssqmm 0 Posted May 10, 2013 Report Share Posted May 10, 2013 I am finishing up my bot that submits forms on websites. I feed the bot a text file of the various URLs to visit and submit the form. My question is, if anyone can give me advice on how to put in rules--- to know for certain if a submission was successfully made or not made... and then log it in a separate file? I tried to look at some tutorials for "save to file", but I think that is just one part of what I have to do. If anyone has any tutorials on this, that would be great. Thanks Quote Link to post Share on other sites
abbas786 78 Posted May 10, 2013 Report Share Posted May 10, 2013 Check the submitted page for any kind of message that indicates a successful submission and save results in result file on the basis of the message. Hope it helps Quote Link to post Share on other sites
ssqmm 0 Posted May 11, 2013 Author Report Share Posted May 11, 2013 hmm good point. Strange thing is I don't see a submitted page load (even though i know it is working), as it moves onto the next URL as it finishes submitting...even though I put in a "wait" delay. Quote Link to post Share on other sites
abbas786 78 Posted May 12, 2013 Report Share Posted May 12, 2013 You can mark a specific element that appears on the next URL, if exists assume it as a successful submission. Quote Link to post Share on other sites
ssqmm 0 Posted May 14, 2013 Author Report Share Posted May 14, 2013 I am somewhat successful in figuring it out now. I just had one question... in regards to having multiple search queries, is there a breaker or separator I could use? I don't want to have to create hundreds of if/else statements. I'm looking for the "boss" keyword within the search page. I would also like the bot to search for boss OR thank you OR submit. Is that possible? Thanks for your help Quote Link to post Share on other sites
LazyBotter 188 Posted May 17, 2013 Report Share Posted May 17, 2013 Something like this? clear list(%Keywords_Found) clear list(%Keywords) add list to list(%Keywords, $list from text("Keyword 1 Keyword 2 Keyword 3 Keyword 4 Keyword 5", $new line), "Delete", "Global") set(#Pos, 0, "Global") set(#Found, $false, "Global") loop($list total(%Keywords)) { if($both($exists(<innertext=$list item(%Keywords, #Pos)>), $comparison(#Found, "=", $false))) { then { set(#Found, $true, "Global") add item to list(%Keywords_Found, $list item(%Keywords, #Pos), "Delete", "Global") } else { increment(#Pos) } } } Carl Quote Link to post Share on other sites
LazyBotter 188 Posted May 17, 2013 Report Share Posted May 17, 2013 You can also use the $either function inside your if statement. Quote Link to post Share on other sites
VaultBoss 310 Posted May 17, 2013 Report Share Posted May 17, 2013 They have different meaning though... $either is the OR while $both is the AND operator in IBS. If you want to find/scrape only when ALL the keywords (2 or more) are present, not when only SOME of them are, then the way to go is $both (works for 2 conditions, but you can cascade them for more)On the other hand, if you want to scrape ALL instances, whether one keyword, two or more, in any combination, are present, then the way to go is to use $either. 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.