DEV Community

Lizard
Lizard

Posted on • Edited on

3 1

Circumventing news article blockers

I wanted to read this article: https://www.ocregister.com/2015/03/20/match-day-reveals-future-for-graduating-uc-irvine-medical-students/

But since I had my adblocker on I could not read the article. I could have turned of my adblocker to read the article but for other websites it is not so easy.

Sometimes you have to have a subscription in order to read the article. Usually I try to delete the popup box using inspect element. But some news articles blur out the text when you get the popup making it impossible to read the article even after deleting the popup. I found a neat way of being able to read such an article.

Upon requesting a webpage, such articles always seem to be loaded correctly but then quickly you get a popup, text blurs etc, etc. So I thought about downloading the html source code with curl and storing it in an html document. Then you open the file and voila. It worked and this is now one of the ways I read news articles for free if I really want to.

Here's a simple python script for it (for windows).

import os
import webbrowser

url = input("Link to article: ")
os.system(f"curl {url} > temp.html")
webbrowser.open('file://' + os.path.realpath("temp.html"))
Enter fullscreen mode Exit fullscreen mode

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up