--- id: adblockparser version: "0.7" license: MIT license_treatment: permissive maintenance: abandoned --- # adblockparser — Parser for Adblock Plus rules License: permissive · Maintenance: abandoned · Downloads: 140.8K/mo ## What it is and what it does adblockparser is a Python library for parsing and applying Adblock Plus filter rules. It reads filter rules (either manually written or from sources like EasyList) and provides a method to check whether a given URL should be blocked according to those rules. The library handles both simple wildcard-style filters and more complex rules with options like domain-specific matching and script-type filtering. The package creates large regex patterns internally to match filters efficiently. It optionally integrates with pyre2 for dramatic performance improvements—potentially over 1000x faster for large filter lists. Without pyre2, it falls back to Python's standard re module. Rules with options are evaluated individually, which can be slower with thousands of such rules, but the library provides configuration options to optimize this scenario. Use it for: - Build a web scraper or crawler that respects Adblock Plus rules to avoid fetching blocked resources - Implement ad filtering in a browser extension or application using standard filter lists - Filter URLs in a content management system or proxy to block ads and trackers based on EasyList rules - Test URL filtering logic by programmatically checking whether specific URLs match filter rules - Load and apply custom Adblock Plus filters to control which domains or resources are accessible ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses Adblock Plus filter rules and matches URLs against them to determine whether they should be blocked. No. The package is abandoned (last commit 2019, last release 2016) with no active maintenance. While it has low install friction and no security vulnerabilities, the lack of updates means it may not handle modern Adblock Plus syntax changes or work reliably on current Python versions. Use only if you have a legacy codebase already depending on it. ## Install pip install adblockparser uv add adblockparser poetry add adblockparser ## Installing adblockparser Before you install: Low install friction with no runtime dependencies. However, the package is abandoned as of 2019 with no active maintenance, and the last release was in 2016. License in practice: MIT license permits commercial and private use with minimal restrictions, requiring only license and copyright notice inclusion. Quickstart: pip install adblockparser from adblockparser import AdblockRules raw_rules = ["||ads.example.com^", "@@||ads.example.com/notbanner^$~script"] rules = AdblockRules(raw_rules) rules.should_block("http://ads.example.com") pyre2 library is optional but highly recommended for performance; it requires C++ re2 library installed on the system. Verify before relying: - Whether the package works reliably with Python versions beyond 3.5, given its abandoned status - Current compatibility with recent Adblock Plus filter syntax changes since 2016 - Whether pyre2 optional dependency remains available and functional on current systems ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 140.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags adblock plus filter parsing, url blocking rules, adblock filter matching, easylist parser, content filtering, ad blocking engine, filter rule evaluation, adblock-filtering, url-matching, abandoned [View on SkillFed](https://skillfed.io/packages/adblockparser) · [View on PyPI](https://pypi.org/project/adblockparser/)