Jump to content
UBot Underground

Scrape Call Only Ads


Recommended Posts

Hi all,

 

Been a while since I fired up ubot and need to do a small bot for scraping ads that have a phone number in them, specifically click to call.

 

These are viewed on iPhone user agent.

Could anyone help me with the script to scrape just the ads that have the phone number icon in them like you can see in the screenshot

 

Here's what I am working with currently:

clear list(%ads)
set user agent("iPhone")
ui text box("Search",#keyword)
navigate("http://google.ie","Wait")
wait for browser event("Page Loaded","")
type text(<name="q">,#keyword,"Standard")
wait(1)
click(<name="btnG">,"Left Click","No")
wait for browser event("Page Loaded","")
add list to list(%ads,$scrape attribute(<innerhtml=w"<a href=\"javascript:void(0)\" onclick=\"(function()\{var au=\'/aclk?*\';var pu=\'tel:*\';google.load(\'mad\',function()\{google.mad.bd(au,pu);\});\})();\" data-ved=\"*\">*</a>">,"innertext"),"Delete","Global")
clear list(%ads)
scrape table(<tagname="ol">,&ads)
add list to list(%ads,$scrape attribute(<innerhtml=w"<li class=\"ads-ad RTUwJd\"><h3><a href=\"/aclk?sa=l&ai=*</li>">,"innertext"),"Delete","Global")

Here's a screenshot of what I need to scrape:

 

2018-05-18_1211.png

 

 

Thanks in advance!

Link to post
Share on other sites

try

add list to list(%ads,$scrape attribute(<(class=w"ads-ad*" AND innertext=w"*CALL*")>,"innertext"),"Delete","Global")
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...