Synol 0 Posted November 23, 2011 Report Share Posted November 23, 2011 I'm trying to make a bot but I need to find a way to have the bot extract the source code and then rip out a string of my choosing then return a value from that string. Here is what I have tried unsuccessfully so far... Scrape attribute - Does not work because it will not let me select to entire string. It thinks the 2 items I need to scrape are seperate entities even though they appear together in the source code. For example it will let me select: <td>innertext</td> or <input type="radio" value="1" checked=""> but not the entire string of <input type="radio" value="2" checked=""><td>innertext</td> I need ubot to grab the entire string and tell me the value for a specific innertext. Seems like it should be fairly simple to just add a wildcard into value and have it match the innertext but for the life of me I cannot figure out how to do it. Or even if I could just have it match "<input type="radio" value="2" checked=""><td>innertext</td>" exactly that would suffice also, then I could just make an if statement and tell it to do what I want when it is matched, but that would be less useful for my needs. Any help would be greatly appreciated. Edit: Forums won't let me post again today, not very good for troubleshooting heh. Hit me up on skype if you want to help please (geoffreytuck82) To further explain the issue. I'm creating a link directory submission bot and at the top they have radio buttons for Paid, Free with reciprocal link, Free, etc. However sometimes the buttons change order or there are extra buttons. So I need to be able to simply match the text "Regular link - free" with whichever value="" is set to it. And since all the radio buttons share the same name="LINK_TYPE" tag I can't use that to select the right one. I figure if I can get the program to somehow recognise the phrase <input type="radio" value="2" checked=""><td>Regular link - free</td> then all I would have to do is pull out the value="" and then tell it to select that. But Scrape Attribute will only select <input type="radio" value="2" checked=""> so I can't tell it to match the innertext "Regular link - free" because it isnt in there. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted November 23, 2011 Report Share Posted November 23, 2011 page url? and what your looking to scrape the value of from that page? Going by just what you list as source is not always best practice and might in fact cause code not to function properly in a real life instance. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted November 23, 2011 Report Share Posted November 23, 2011 New example to postinghttp://screencast.com/t/absjbOOv Quote Link to post Share on other sites
firionicable 0 Posted November 29, 2011 Report Share Posted November 29, 2011 Hello, guys. Where can I find the page where you can start learning about Ubot? Sorry for such question. Thanks a lot in advance. 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.