Critical: Exclude the first line from GFWList

This commit is contained in:
iBug 2020-07-27 14:02:06 +08:00
parent c09c33bcf1
commit 7cbc3f6b06

View File

@ -51,7 +51,7 @@ def parse_gfwlist(text):
blackpat = [] # blacklisted patterns blackpat = [] # blacklisted patterns
whitepat = [] # whitelisted patterns whitepat = [] # whitelisted patterns
for line in text.splitlines(): for line in text.splitlines()[1:]:
if not line.strip() or line.startswith("!"): if not line.strip() or line.startswith("!"):
continue # ignore comments and empty lines continue # ignore comments and empty lines