RegEx easylist cleanup
The snippet can be accessed without any authentication.
Authored by
Jan Maria Kopankiewicz
removes regular expression characters from easylist_adservers list.
import re
from requests import get
src_file='https://raw.githubusercontent.com/easylist/easylist/master/easylist/easylist_adservers.txt'
src = get(src_file).text
replaced = re.sub('\|', '', src)
replaced = re.sub('\^.*', '', replaced)
replaced = re.sub('\!.*', '', replaced)
easylist_adservers = replaced.splitlines()
Please register or sign in to comment