Skip to content

Instantly share code, notes, and snippets.

Created July 7, 2010 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/467059 to your computer and use it in GitHub Desktop.
Save anonymous/467059 to your computer and use it in GitHub Desktop.
use warnings;
use strict;
use WWW::Mechanize;
use_ok( 'WWW::Mechanize::Sleepy' );
my $Explorador = WWW::Mechanize->new( agent => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624', sleep => '5..20' );
$Explorador->get("file:/home/alejandro/Escritorio/hehe.php.html"); #Proceed to access the URL to find all the links in emails
#If you want debug DOM Document.
#print $Explorador->content();
my @links = $Explorador->links;
foreach my $link (@links) {
# Retrieve the link URL :http://valeptr.com/scripts/runner.php?IM=0cdb7d28110375.
my $href = $link->url;
# Retrieve the link text
#my $name = $link->text;
print "\nLinks:",$href;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment