abp-blocklist-parser-0.3
توضیحات
Library for parsing ABP filter lists
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | abp-blocklist-parser-0.3 |
| نام | abp-blocklist-parser |
| نسخه کتابخانه | 0.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Steven Englehardt |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/englehardt/abp-blocklist-parser |
| آدرس اینترنتی | https://pypi.org/project/abp-blocklist-parser/ |
| مجوز | GPL v3 |
# 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
نحوه نصب
نصب پکیج whl abp-blocklist-parser-0.3:
pip install abp-blocklist-parser-0.3.whl
نصب پکیج tar.gz abp-blocklist-parser-0.3:
pip install abp-blocklist-parser-0.3.tar.gz