Skip to main content

Library for parsing ABP filter lists

Project description

BlockListParser

Code to detect if a url matches any of the regexes in lists like ad block plus lists

In order to use it,

blocklist_parser = new BlockListParser(regex_file)

or

blocklist_parser = new BlockListParser(regexes) where regexes is comma separated list of regexes

Then to detect if something should be blocked,

blocklist_parser.should_block(ur, options) where options is a dictionary with keys like image, third-party, etc. (look at RegexParser.py for a list of options possible).

Also, use

blocklist_parser.should_block_with_items(url, options) to get the list of regexes which block a certain url

Project details


Download files

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

Source Distribution

abp-blocklist-parser-0.3.tar.gz (21.3 kB view hashes)

Uploaded Source

Built Distribution

abp_blocklist_parser-0.3-py3-none-any.whl (21.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page