From 4d5e11bed1221763af3fd90ba02f0c11ecb8dee0 Mon Sep 17 00:00:00 2001 From: Johnshall <71166067+Johnshall@users.noreply.github.com> Date: Wed, 24 Aug 2022 22:45:58 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=95=20Fix=20type=20err?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- factory/gfwlist.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/factory/gfwlist.py b/factory/gfwlist.py index eada97b..a8d611c 100644 --- a/factory/gfwlist.py +++ b/factory/gfwlist.py @@ -38,6 +38,8 @@ def get_rule(rules_url, ruleType='raw'): rule = base64.b64decode(r.text) \ .decode("utf-8") \ .replace('\\n', '\n') + else: + rule = r.text return rule @@ -99,7 +101,7 @@ def getURLs(url): rule = get_rule(rules_url='https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt', ruleType='base64') # 从 https://github.com/Johnshall/cn-blocked-domain 中获取GFWList的补充 -rules.extend(getURLs('https://raw.githubusercontent.com/Johnshall/cn-blocked-domain/release/domains.txt')) +rule += get_rule('https://raw.githubusercontent.com/Johnshall/cn-blocked-domain/release/domains.txt') rules = clear_format(rule)