Jump to content
UBot Underground

Http Get Difference In Defined Function Compared To Normal Command


Recommended Posts

Hi all,

 

I am noticing that just a regular http get inside a function renders the page, while a http get command does not render the page in the browser.

 

What could be causing this? Obviously if the page has to be rendered in the browser there is no sense for me to use http get as it is just as slow as navigate. 

 

Thanks,

Link to post
Share on other sites

This is how you would use it, you can load the variables into the browser if you want to see the output but the point is to not use the browser so I would avoid it unless you need to show something for a reason:

set(#get,$plugin function("HTTP post.dll", "$http get", "http://www.ubotstudio.com/resources", "", "", "", ""),"Global")
set(#getScrape,$plugin function("HTTP post.dll", "$xpath parser", #get, "//a[@class=\'btn btn-primary\']", "InnerText", "HTML"),"Global")
alert(#getScrape)
set(#post,$plugin function("HTTP post.dll", "$http post", "https://httpbin.org/post", "", "", "", "", ""),"Global")
alert(#post)
Link to post
Share on other sites
Hi Nick,
 
Basically I had this working as a normal command but it just did not work all day in a define function. I just tested it again today and seems to be working now
 
define $scrape content {
    set(#page,$plugin function("HTTP post.dll", "$http get", "https://www.site.coml", "", "", "", ""),"Global")
    set(#xpath,"//*[contains(concat( \" \", @class, \" \" ), concat( \" \", \"main-content\", \" \" ))]","Global")
    set(#content,$plugin function("HeopasCustom.dll", "$Heopas Xpath Parser", #page, #xpath, "InnerText", ""),"Global")
    return(#content)
}

Thanks!

  • Like 1
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...