ibotubot 3 Posted November 1, 2017 Report Share Posted November 1, 2017 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, Quote Link to post Share on other sites
HelloInsomnia 1103 Posted November 1, 2017 Report Share Posted November 1, 2017 What are you using? There are a couple of plugins that use HTTP requests. Quote Link to post Share on other sites
ibotubot 3 Posted November 1, 2017 Author Report Share Posted November 1, 2017 Sorry : I tried both - Ayman's http plugin as well as Heopas plugin for the HTTP get Quote Link to post Share on other sites
HelloInsomnia 1103 Posted November 1, 2017 Report Share Posted November 1, 2017 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) Quote Link to post Share on other sites
ibotubot 3 Posted November 2, 2017 Author Report Share Posted November 2, 2017 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! 1 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.