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.

Files for braveblock, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size braveblock-0.1.5-cp36-cp36m-macosx_10_7_x86_64.whl (960.7 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size braveblock-0.1.5-cp36-cp36m-manylinux1_x86_64.whl (1.0 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size braveblock-0.1.5-cp36-none-win_amd64.whl (955.2 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size braveblock-0.1.5-cp37-cp37m-macosx_10_7_x86_64.whl (958.3 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size braveblock-0.1.5-cp37-cp37m-manylinux1_x86_64.whl (1.0 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size braveblock-0.1.5-cp37-none-win_amd64.whl (955.0 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size braveblock-0.1.5-cp38-cp38-macosx_10_7_x86_64.whl (958.4 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size braveblock-0.1.5-cp38-cp38-manylinux1_x86_64.whl (1.0 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size braveblock-0.1.5-cp38-none-win_amd64.whl (954.4 kB) File type Wheel Python version cp38 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page