NAME

WWW::Mechanize::Chrome::URLBlacklist - blacklist URLs from fetching

SYNOPSIS

use WWW::Mechanize::Chrome;
use WWW::Mechanize::Chrome::URLBlacklist;

my $mech = WWW::Mechanize::Chrome->new();
my $bl = WWW::Mechanize::Chrome::URLBlacklist->new(
    blacklist => [
        qr!\bgoogleadservices\b!,
    ],
    whitelist => [
        qr!\bgoogleadservices\b!,
    ],

    # fail all unknown URLs
    default => 'failRequest',
    # allow all unknown URLs
    # default => 'continueRequest',

    on_default => sub {
        warn "Ignored URL $_[0] (action was '$_[1]')",
    },
);
$bl->enable($mech);

DESCRIPTION

This module allows an easy approach to whitelisting/blacklisting URLs so that Chrome does not make requests to the blacklisted URLs.

REPOSITORY

The public repository of this module is https://github.com/Corion/www-mechanize-chrome.

SUPPORT

The public support forum of this module is https://perlmonks.org/.

TALKS

I've given a German talk at GPW 2017, see http://act.yapc.eu/gpw2017/talk/7027 and https://corion.net/talks for the slides.

At The Perl Conference 2017 in Amsterdam, I also presented a talk, see http://act.perlconference.org/tpc-2017-amsterdam/talk/7022. The slides for the English presentation at TPCiA 2017 are at https://corion.net/talks/WWW-Mechanize-Chrome/www-mechanize-chrome.en.html.

BUG TRACKER

Please report bugs in this module via the RT CPAN bug queue at https://rt.cpan.org/Public/Dist/Display.html?Name=WWW-Mechanize-Chrome or via mail to www-mechanize-Chrome-Bugs@rt.cpan.org.

AUTHOR

Max Maischein corion@cpan.org

COPYRIGHT (c)

Copyright 2010-2020 by Max Maischein corion@cpan.org.

LICENSE

This module is released under the same terms as Perl itself.