Comment on Ask HN: How to remove Ads from a downloaded HTML file to output an ad free file?Comments−solardev1yDo you have to use Curl? It wouldn't render a lot of sites correctly anyway (anything that uses JS for rendering).Can you run a puppeteer/playwright instance (which control real browsers) and add an ad blocker to that? e.g. https://github.com/ghostery/adblocker or https://github.com/microsoft/playwright-python/issues/782−suramya_tomarOP1yI don't have to use curl, but in the past when I have setup something that opens browser instances it has usually been a bit unstable in the sense that it would crash intermittently.I wanted something that I could kick-off as a daily cron job.−solardev1yHmm, can't you check for correctness somehow and retry on failure? Those headless browsers are often run in automated environments.
Comments
Do you have to use Curl? It wouldn't render a lot of sites correctly anyway (anything that uses JS for rendering).
Can you run a puppeteer/playwright instance (which control real browsers) and add an ad blocker to that? e.g. https://github.com/ghostery/adblocker or https://github.com/microsoft/playwright-python/issues/782
I don't have to use curl, but in the past when I have setup something that opens browser instances it has usually been a bit unstable in the sense that it would crash intermittently.
I wanted something that I could kick-off as a daily cron job.
Hmm, can't you check for correctness somehow and retry on failure? Those headless browsers are often run in automated environments.