Created
October 24, 2017 21:58
-
-
Save diegok/9c55d541baa4f43ce3d1e98a79cb4aef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use common::sense; | |
use Mojo::UserAgent; | |
use Email::Address; | |
my $url = shift || say("Usage: $0 URL") && exit; | |
my $dom = Mojo::UserAgent->new->get($url)->res->dom; | |
say $_->address for Email::Address->parse( $dom->content ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example usage:
./get-mail.pl http://www.publico.es/pages/contacto.html