Jump to content
UBot Underground

Recommended Posts

Been working with web with a ton of ads (google ads, dll), very annoying & make bot load slow.

tried to disable JS...and yes ads disappear, but the bot not working properly, because the bot uses JS itself.

Do you know how we can block ads without disable JS entirely?
Like Adblockplus addons in firefox i mean.

Link to post
Share on other sites
Block them using your hosts file C:\Windows\System32\drivers\etc\hosts.  It can take a while but worth it.

Ok, thanks mate...works perfectly.

 

But still searching the other way in bot itself...because i'll also send to my client.

Link to post
Share on other sites
  • 3 years later...

I had this question as well, so instead of making a new thread, I will just ask:

 

How can we block ads for client side bots? Just like adblock plus firefox extension. Something aside from having to buy xbrowser and use firefox itself, or disable java.

Link to post
Share on other sites

easiest way assuming you are making a bot for one particular platform their ads will probably be the same HTML on each page,check this out,it deletes the google ads from this page,though this probably wont help performance,it will at least look cleaner for the customer

 

This is slightly hacky

 

basically when navigating to a new page,turn on headless browser,leave page load,remove the adds and then display the page to the customer

 

 

ive noticed from testing that sometime Ubot displays elements that were previously viewable before I turn headless On,will be their when I turn it off

 

Example,,run this,then,press refresh on browser,then run the script without the javscript and the ads should be their,though not live,literally the same ad that was present before you ran the script,if you scroll they disappear,seems to be stored in memory or something,so I added a tiny scroll which a user wouldn't notice

set headless browser("On")
allow images("Yes")
allow javascript("Yes")
allow css("Yes")
navigate("http://www.speedtest.net/","Wait")
wait for browser event("Everything Loaded","")
change attribute(<id=w"google_ads_iframe_*">,"innerhtml","")
set headless browser("Off")
run javascript("document.body.scrollTop = document.body.scrollTop+2")
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...