Jump to content
UBot Underground

Recommended Posts

I tried a few things but can't get it to work.

 

What i want to do is loading a page, then using a regular expression that scrapes a particular strings (let's say phone number for example) and add that to a list.

 

I need to scrape this way, because $scrape page or $scrape attribute is not possible on this particular site.

 

So what i want is the webpage loads, it checks whether a particular string is present anywhere on the page, if yes then scrape that string and add it to a list.

Link to post
Share on other sites

[...] because $scrape page or $scrape attribute is not possible on this particular site.

 

Now you made me curious! Why is that?

Can you share the website URL?..

 

Let's take a look!

Link to post
Share on other sites

Without knowing the string we can't give you the regex. Phone numbers can be listed in different ways and each way can give a different regex. I'm still learning regex but I'll give it a crack if you post the string you need to find.

Link to post
Share on other sites

Thanks for the replies, i already have the regex and the site remains private, but i only wanted to know how to use it with scraping a webpage like mentioned in post #1.

 

The bot loads a webpage then runs the regex to scrape if anything meets that regex.

Link to post
Share on other sites

Not exactly the way you probably want to do it, but this is the only way I've been able to do it

 

set(#var, $page scrape("<html", "</html>"), "Global")
clear list(%test)
add list to list(%test, $find regular expression(#var, "your regex"), "Delete", "Global")
if($comparison($list total(%test), ">", 0)) {
   then {
    alert("yup")
   }
   else {
    alert("no")
   }
}

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