How to scrape numbers in Scrapebox?

Daffy10

Regular Member
Joined
Mar 12, 2014
Messages
323
Reaction score
45
There is any way to scrape such kind of numbers? https://www.instagram.com/dr.gianlucaidrontino/

I tried with "grab phone number" but is not taking scrapebox..I know all prefix of italy (349,347 and ect or anyway as rule they start with 3) but wich way could be for making it grabbed? thanks a lot!
 
If you can't seem to do it with SB, there are scrapers for Instagram specifically, for instance this one has a free trial: https://www.blackhatworld.com/seo/i...one-number-scraper-bulk-email-sender.1199052/, but i guess, you can find others too.

Or scrape the full bios: https://www.blackhatworld.com/seo/i...raper-url-and-email-address-extractor.984618/ and use a tool like this: https://www.convertcsv.com/phone-extractor.htm or Notepad++ and some regex to extract the phone numbers: https://stackoverflow.com/questions/34697618/extract-numbers-using-regex-and-notepad
 
This should work fine. I pulled the request in debugger and looked at the same code scrapebox sees and I can see the
338/5468235

which I assume is the phone number that you want?

So what is the issue, is it that you don't know what regex to use or that it giving some kind of error or ?
 
This should work fine. I pulled the request in debugger and looked at the same code scrapebox sees and I can see the
338/5468235

which I assume is the phone number that you want?

So what is the issue, is it that you don't know what regex to use or that it giving some kind of error or ?
Hi there,
thanks for your answer. By simply clicking on "grab phone numbers" no any phone numbers is gettig taken, simply show 0 phone numbers. Maybe need to be created a new masks more the 3 defaul us numbers?
 
Hi there,
thanks for your answer. By simply clicking on "grab phone numbers" no any phone numbers is gettig taken, simply show 0 phone numbers. Maybe need to be created a new masks more the 3 defaul us numbers?
Yes you need to create your own masks. There are thousands of phone number variations world wide. Man hours aside, scrapebox could not put in all those formats because you would wind up with so many false positives when scraping, it would make the data worthless.

So they added 3 example phone number formats to get you started, but its intended that the end user will make the masks relevant to the country they are working with. You can look at the example ones to understand it, but its pretty easy.

However I wrote up an article on how to do it here, and the various nuances etc..
http://scrapeboxfaq.com/how-to-build-the-regex-for-phone-number-scraping
 
Yes you need to create your own masks. There are thousands of phone number variations world wide. Man hours aside, scrapebox could not put in all those formats because you would wind up with so many false positives when scraping, it would make the data worthless.

So they added 3 example phone number formats to get you started, but its intended that the end user will make the masks relevant to the country they are working with. You can look at the example ones to understand it, but its pretty easy.

However I wrote up an article on how to do it here, and the various nuances etc..
http://scrapeboxfaq.com/how-to-build-the-regex-for-phone-number-scraping

Hi,
So, I make some test but unfurtunally no success.. I tried with this link: https://www.instagram.com/chi.pla/ and regex I set \d{10} in one, and in another \d{3}\d{7} but no success at all..So i tried this one but when i do this, its immidiatly crashing scrapebox..
Screenshot_9.jpgScreenshot_9.jpg
 
Hi,
So, I make some test but unfurtunally no success.. I tried with this link: https://www.instagram.com/chi.pla/ and regex I set \d{10} in one, and in another \d{3}\d{7} but no success at all..So i tried this one but when i do this, its immidiatly crashing scrapebox..
View attachment 140186View attachment 140186
Are you trying to get a 10 digit number starting with 3? In the screenshot, it seems that you have a wrong regex pattern. \3 isn't valid, if I haven't mistaken.

Try this instead:
^([3]\d{9})$
or
([3]\d{9})
or
^(3\d{9})$
or
(3\d{9})
or
3\d{9}

(which ever works lol)
Obviously, I do not use this feature (I would simply code a python script in 10 minutes if I needed to do this) and I do not know whether SB follows normal regex.. But there's no harm in trying. :)

This would atleast work with JS. To test, go to that insta page, open console (press F12) and in console paste this:
var str=document.documentElement.innerHTML;console.log(str.match(/3\d{9}/)[0]);
It will give you the mobile number.
 
Last edited:
Are you trying to get a 10 digit number starting with 3? In the screenshot, it seems that you have a wrong regex pattern. \3 isn't valid, if I haven't mistaken.

Try this instead:
^([3]\d{9})$
or
([3]\d{9})
or
^(3\d{9})$
or
(3\d{9})
or
3\d{9}

(which ever works lol)
Obviously, I do not use this feature (I would simply code a python script in 10 minutes if I needed to do this) and I do not know whether SB follows normal regex.. But there's no harm in trying. :)

This would atleast work with JS. To test, go to that insta page, open console (press F12) and in console paste this:
var str=document.documentElement.innerHTML;console.log(str.match(/3\d{9}/)[0]);
It will give you the mobile number.

Thank you for your message.
I tried your regex above but is not taking that number, is taking another I don't kno even from where.. Indeed from here var str=document.documentElement.innerHTML;console.log(str.match(/3\d{9}/)[0]); too is not working, because is taking a totally different number
Code:
[ATTACH type="full"]140197[/ATTACH]
 

Attachments

  • Screenshot_10.jpg
    Screenshot_10.jpg
    78.8 KB · Views: 9
Last edited:
Thank you for your message.
I tried your regex above but is not taking that number, is taking another I don't kno even from where.. Indeed from here var str=document.documentElement.innerHTML;console.log(str.match(/3\d{9}/)[0]); too is not working, because is taking a totally different number
Code:
[ATTACH type="full"]140197[/ATTACH]
Oops so it is taking a number from the html source somehow. I rechecked and it shows me a different number too. However, if you take innerText instead of innerHTML, it will give you the correct number. Something like...
var str=document.documentElement.innerText;console.log(str.match(/3\d{9}/)[0]);

But anyway, it is not what you want to do ultimately. I suspect SB doesn't fetch the phone number because that description is fetched using AJAX (I could be wrong. Did not investigate it fully.).

If you wanted to try python, you could do it with Python + Selenium. Here's an example I made for you..

Code:
https://pastebin.com/dmPJQTf3

For this to work you will need Python 3 and selenium chrome driver.

This is just a barebone script, but you could always modify this and put a list of urls there. The sleep could also use some improvement (wait for the element to load instead of sleeping), but it's just a 5 minute script lol.

P.S. : I get forbidden error if I try to post code. @Diamond Damien, can't anything be done about it? It's very inconvenient having to post external pastebin source, and it makes the code tag of no real use.. :(
 
The phone number does need to be publicly viewable in the source html with javsacript turned off. So if the phone number is generated by some kind of script/ajax then scrapebox won't be able to see it.
 
if the phone number is generated by some kind of script/ajax then scrapebox won't be able to see it.
and this could certainly use some improvement, @Sweetfunny. SB is a beast, no doubt. Enabling JS would make it even better. :)
 
Thank you for your message.
I tried your regex above but is not taking that number, is taking another I don't kno even from where.. Indeed from here var str=document.documentElement.innerHTML;console.log(str.match(/3\d{9}/)[0]); too is not working, because is taking a totally different number
Code:
[ATTACH type="full"]140197[/ATTACH]

3\d{9}

works fine, kind of. I mean it will find a number that starts with 3 and has 9 other digits following.

But there are 4 sets of numbers in that html that matches that, as there is no formatting in that phone number that makes it unique. so a before/after using the custom data scraper might be better for this specific case.
and this could certainly use some improvement, @Sweetfunny. SB is a beast, no doubt. Enabling JS would make it even better. :)

Scrapebox uses raw sockets and threads and these are a global convention that does not support javacript.

Im not sayings its impossible, but it would probably take rewriting half of scrapebox and then it probably would cripple a bunch of things and then there are other issues. Anyway just sharing.
 
Back
Top