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.3
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.3.tar.gz | 21.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| abp_blocklist_parser-0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.5 kB
Release files / abp-blocklist-parser-0.3.tar.gz
| Download URL | abp-blocklist-parser-0.3.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d709dda133d1d6e26ef1ef1099efcf46b67ed40af6e81514f99c4d7e6192d97d
|
|
BLAKE2b-256 checksum How to use checksums |
543439816a936a1875b1f8b7ca1df4bb56b1ef3a333c20473f76e000becab00e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.9
|
Release files / abp_blocklist_parser-0.3-py3-none-any.whl
| Download URL | abp_blocklist_parser-0.3-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3a754b9198ef4b637ad4399aac6836a23548dd0427cc4bada05ab26ead8a7f0
|
|
BLAKE2b-256 checksum How to use checksums |
070cf1ab65d3fd44789e5f2a8b06fe1e50337ac50d6f5ad266632f5ae23f93a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.9
|