Ask HN: How to locate ads on websites programmatically?
Let's say if i want to screenshot the ad banners which appear on the website. How can i do this?
The challenge is the determine what is a banner programmatically.
What technology can be used for this?
6 comments
[ 551 ms ] story [ 167 ms ] threadhttps://github.com/gorhill/uBlock
The basic algorithm is to match URLs of loadable resources (images, JavaScript files, iframes, etc.) against huge lists of ad/malware/tracking sites. If the URL matches, the resource isn't loaded. The lists that uBlock Origin uses are enumerated here:
https://github.com/gorhill/uBlock/blob/master/README.md