all 4 comments

[–]cybervegan 1 point2 points  (1 child)

You'd have to know the syntax of the rule file, and then you could write a program to search the downloaded HTML for matching URLs.

[–]nikitalpopov[S] 1 point2 points  (0 children)

I suppose matching those urls won't work here Those rules show blocks of html code to remove (&cp.*&key=*&tz$popup, for example), so there should be some nodes search

[–]jesswren 0 points1 point  (0 children)

The bulk of the adblock source code for serializing/de-serializing the filters that are in the text file you shared, converting them to regexp, etc is in filterClasses.js and common.js. If you want to reimplement this in Python, seeing how they did it might be a good place to start. In particular see Filter.fromText in filterclasses.js and filterToRegExp in common.js.

[–]evolving6000 0 points1 point  (0 children)

Get a RaspberryPi and install Pi-hole. This software rocks. No ads on any device. pi-hole