Jump to content
UBot Underground

Help Scraping Profile Url Of Facebook


Recommended Posts

Hi,

Thanks for being so supportive and here I am again stuck in scraping a profile url of facebook, as you know facebook profile sometime comes with name and some time with ID..

 

like 

https://www.facebook.com/cindyjuana.chavez

sometime 

https://www.facebook.com/profile.php?id=100010928299153

 

How I scrape these two kinds of url 

 

Many many thanks for your help

 

If found a regex but don't know who to use 

^(?:.*)\/(?:pages\/[[:alnum:]-]+\/)?(?:profile\.php\?id=)?([[:alnum:].]+)

Edited by spa3212
Link to post
Share on other sites

Are the names always in that format where it has a dot in them?

 

If you can provide more examples then I can make a more exact regex possibly but for those urls you can use this:

https\:\/\/www\.facebook\.com\/(profile\.php\?id\=\d+|[a-z]+\.[a-z]+)

It's just likely that it will pick up on other things as well. And it looks for the dot in the profile as well to avoid pages like /about

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