need Adblockplus filter systemwide via /etc/hosts

99 Views Asked by At

I'm scraping some websites to get at content they have using selenium in python. I can run headless firefox via geckodriver with marionette capability set to True with adblockplus extension enabled and it works well. However recent versions of firefox (as of March 2021) don't support performance logging - which is a must for my purpose. So I've had to switch to using chromedriver and Chromium. Logging works great but chromium when being run in headless mode has no support for browser extensions and throws errors.

So I figure I keep using chromedriver with Chromium but not having adblockplus or any other adblocking is really hurting my runtime and there are some overlays that wouldn't be there otherwise.

How can I find and extract the filter list of my adblockplus browser extension so I can apply the same filtering by using the domain names in there and my /etc/hosts file i.e. sending all those 'bad' domains to 0.0.0.0

1

There are 1 best solutions below

3
On

If you open the settings and click on the advanced. you will see the filters. Each filter points to an url where there are stored.

enter image description here

1.The easy list i previous linked: https://easylist-downloads.adblockplus.org/easylist.txt 2. The ABP filters https://easylist-downloads.adblockplus.org/abp-filters-anti-cv.txt