Jump to content
UBot Underground

Creating log file for every submission


Recommended Posts

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

Link to post
Share on other sites

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 :)

Link to post
Share on other sites

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. 

Link to post
Share on other sites

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
 
 
Link to post
Share on other sites

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

Link to post
Share on other sites

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.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...