use HTML::LinkExtractor;
use LWP::Simple;
use Data::Dumper;
use LWP::UserAgent;

$ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 1 });
$res = $ua->get("https://news.google.de/news/story?ncl=drvkYTkIx2FwsWMZO6j1p-SWwoDIM&ned=de&topic=n");

#print $res->content;
#print Dumper $res;
unlink "demo.txt";
open(D,">demo.txt");
my $input = $res->content;
my $LX = new HTML::LinkExtractor(undef,undef,1);
$LX->parse(\$input);
for my $Link( @{ $LX->links } ) {
	if( $$Link{_TEXT}=~ m/Leyen/ ) {
		#print "\n LinkText $$Link{_TEXT} URL $$Link{href}\n";
		$text = $$Link{_TEXT};
		$text =~ s/Dr\./Dr/igs;
		print "$text\n";
		print D "$text\n";
	}
}
close D;