Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

Addition of FutureMind Adblock DNS Rules to the Generator #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The following are links to the generated blocklists:
- [DNSMASQ](https://ewpratten.github.io/youtube_ad_blocklist/dnsmasq.txt)
- [unbound](https://ewpratten.github.io/youtube_ad_blocklist/unbound.txt)
- [AdBlockPlus](https://ewpratten.github.io/youtube_ad_blocklist/adblockplus.txt)
- [FutureMind Adblock](https://ewpratten.github.io/youtube_ad_blocklist/futuremind.adblock)

## Credits

Expand Down
6 changes: 5 additions & 1 deletion generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ def generateUnboundList(block_list: List[str]) -> List[str]:
def generateAdblockList(block_list: List[str]) -> List[str]:
return ["[Adblock Plus 2.0]"]+[f"! {line}" for line in file_header.split("\n")]+["||{}^".format(entry) for entry in block_list]

def generateFutureMindList(block_list: List[str]) -> List[str]:
return ["# [FutureMind Adblock]"]+[f"# {line}" for line in file_header.split("\n")]+["YouTube Adservers/{}".format(entry) for entry in block_list]


# All generators
generator_list: dict = {
Expand All @@ -41,7 +44,8 @@ def generateAdblockList(block_list: List[str]) -> List[str]:
"domains.txt": generateDomainsList,
"dnsmasq.txt": generateDNSMASQList,
"unbound.txt": generateUnboundList,
"adblockplus.txt": generateAdblockList
"adblockplus.txt": generateAdblockList,
"futuremind.adblock": generateFutureMindList
}


Expand Down