Jump to content
UBot Underground

REQ: Scrape code & Extract string


Recommended Posts

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.

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...