From 92fa74553341d4cdac134b0cafdaf16fa94b3afa Mon Sep 17 00:00:00 2001 From: Qetesh <4559341+Qetesh@users.noreply.github.com> Date: Sat, 12 Oct 2024 01:08:06 +0800 Subject: support Deny-/allow list wildcard url --- core/__init__.py | 0 core/entry_filter.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 core/__init__.py create mode 100644 core/entry_filter.py (limited to 'core') diff --git a/core/__init__.py b/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/entry_filter.py b/core/entry_filter.py new file mode 100644 index 0000000..62ab9f5 --- /dev/null +++ b/core/entry_filter.py @@ -0,0 +1,31 @@ +import fnmatch + +def filter_entry(config, agent, entry): + start_with_list = [name[1]['title'] for name in config['agents'].items()] + style_block = [name[1]['style_block'] for name in config['agents'].items()] + [start_with_list.append('