How to scrape non-clickable links with Scrabebox??

frankweerasinghe

Power Member
Joined
Jun 6, 2011
Messages
555
Reaction score
430
I have a list of links that contains URL's in non-clickable format in their page source. I need to extract them. I tried with Scrapebox link extractor plugin but it doesn't extract those non-clickable (non a href) urls.

Is their a way to do this?

Thanks!
 
A link is by definition clickable (originates from hyperlink) so scrapebox is already able to extract links.
If what you are looking for is a way to extract url's from a text then the easiest way would probably be to code a custom tool that uses regex.
 
He said a list of links, probably meaning one page. By the time you try and figure out an automated solution, you can paste all the links to a file editor go from there!

If it's a single page there's probably a Perl one liner regex that'll do.
 
This works

$string = "this is my friend's website http://example.com I think it is cool, but this is cooler http://www.memelpower.com :)";
$regex = '/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i';
preg_match_all($regex, $string, $matches);
$urls = $matches[0];
// go over all links
foreach($urls as $url)
{
echo $url.'<br />';
}



Try this http://www.web-max.ca/PHP/misc_23.php

Read what it says very easy to use..
 
Hey guys! Thanks for the replies.. but what I mean is I have a list of links that contain plantext links in each of their page sources. So I have to load each of them and extract the urls in their page sources.
 
Back
Top