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
Metadata
Release files for abp-blocklist-parser 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| abp-blocklist-parser-0.2.tar.gz | 21.4 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| abp_blocklist_parser-0.2-py3-none-any.whl | Python 3 | none | any | Details |
| abp_blocklist_parser-0.2-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 51.9 kB
Release files / abp-blocklist-parser-0.2.tar.gz
| Download URL | abp-blocklist-parser-0.2.tar.gz |
|---|---|
| Size | 21.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d0d769ca95bed9b3becbf58727006867f9208e7c9248c46e207f1fed63c0faf
|
|
BLAKE2b-256 checksum How to use checksums |
175f0fcfe0ce05b0f6fcc0d293e1cd941dfaefec1728613b09ffade428cb3ff1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.10.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15rc1
|
Release files / abp_blocklist_parser-0.2-py3-none-any.whl
| Download URL | abp_blocklist_parser-0.2-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa9a1538bacfa914caec464d39eb26a27ea424a77455db4249d946df196aba1a
|
|
BLAKE2b-256 checksum How to use checksums |
921921b62fcd1dd616c79f687b9b568bc1fb947aa07c358bb007e69b3074bd2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.10.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15rc1
|
Release files / abp_blocklist_parser-0.2-py2-none-any.whl
| Download URL | abp_blocklist_parser-0.2-py2-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
5c7f8663156bd5ff3d9176952fa29d7c73b5d1d59226e861ae31ce20e9b1511b
|
|
BLAKE2b-256 checksum How to use checksums |
f72ccfe11b7651f4f1536f0d482f35d28a4ae04c48b54d5a638260189858a2dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.10.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15rc1
|