Skip to main content

A fast and easy adblockplus parser and matcher based on adblock-rust package

Project description

Logo

A fast and easy adblockplus parser and matcher based on adblock-rust package

license Python OS Build PyPi

Table of Contents

About The Project

This library is a Python binding to the adblock-rust library that was written by Brave's browser team. The binding uses pyo3 to interact with the rust package.

Built With

Installation

pip3 install braveblock

Usage

import braveblock


# Initialize the engine loaded with a rules list
# One can download easylist and load its lines into the engine
braveblock.Adblocker(
    rules=[
        "-advertisement-icon.",
        "-advertisement/script.",
    ]
)

# This function checks whether the specified url should be blocked
adblocker.check_network_urls(
    url="http://example.com/-advertisement-icon.",
    source_url="http://example.com/helloworld",
    request_type="image",
)

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Gal Ben David - gal@intsights.com

Project Link: https://github.com/intsights/Braveblock

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release. See tutorial on generating distribution archives.

Built Distributions

braveblock-0.5.0-cp311-none-win_amd64.whl (1.6 MB view hashes)

Uploaded cp311

braveblock-0.5.0-cp310-none-win_amd64.whl (1.6 MB view hashes)

Uploaded cp310

braveblock-0.5.0-cp39-none-win_amd64.whl (1.6 MB view hashes)

Uploaded cp39

braveblock-0.5.0-cp38-none-win_amd64.whl (1.6 MB view hashes)

Uploaded cp38

braveblock-0.5.0-cp37-none-win_amd64.whl (1.6 MB view hashes)

Uploaded cp37

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page