Skip to content

Commit

Permalink
Update AGH_filters.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Deci8BelioS authored Oct 18, 2024
1 parent c174319 commit 4560bba
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions AGH/AGH_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ def filter_lines(lines):

unified_content = set()

file_exceptions = r"/home/runner/work/AGH_Host/AGH_Host/AGH/filters/whitelist/whitelist.txt"
print(f"Reading from exception file: {file_exceptions}...\n")
with open(file_exceptions, 'r', encoding='utf-8') as file:
exceptions = [line.strip() for line in file]

urls = [
'https://cdn.jsdelivr.net/gh/hagezi/dns-blocklists@latest/adblock/light.txt',
'https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt',
Expand All @@ -76,7 +71,7 @@ def filter_lines(lines):
continue
if domain.endswith(tuple(DOMAIN_LIST)) and not domain.startswith(tuple(DOMAIN_LIST)) or not domain:
continue
if not domain.startswith('||') and not domain.startswith('@@') and not domain.startswith('|') and not domain.startswith('<') and not domain.endswith('^'):
if not domain.startswith(('||', '@@', '|', '<')) and not domain.endswith('^'):
domain = f'||{domain}^'
f.write(f"{domain}\n")

Expand Down

0 comments on commit 4560bba

Please sign in to comment.