← Back to projects PERSONAL PROJECT / PYTHON + DATA

PriceScraper.

I wanted to know whether a price was worth paying. I built a collector that reads the store page, saves the current and lowest recorded prices, and answers queries through Telegram.

View source Python · requests · BeautifulSoup · SQLite · Telegram
PAGE→COLLECT→PRICES→TELEGRAM
01 / THE PROBLEM

Compare with the lowest recorded price.

An offer shows the price right now. PriceScraper collects each product’s data so I can compare it with the lowest recorded price through Telegram. That saves me from opening several pages and writing down the values by hand.

02 / HOW IT WORKS

From the store page to Telegram.

01

Collect

I use requests and BeautifulSoup to read HTML and extract data such as the product and price.

02

Store

SQLite stores each product’s current price, lowest recorded price and timestamps. It does not keep a separate record for every observation.

03

Query

The bot queries the collected data and answers the search in Telegram.

TRY THE FLOW

Compare the sample prices.

Choose a product and move the slider between four fictional prices. The demo shows the comparison. The project stores current and minimum prices without keeping a complete time series.

SAMPLE DATA
OBSERVED PRICER$ 359R$ 40 below the first observation
History4 observations
↗ TELEGRAM RESPONSE

Headphones: R$ 359 now. Lowest observed price: R$ 349.

03 / DECISIONS

Why I used SQLite.

I used SQLite to store and query prices locally. It met the project’s needs without setting up a database service.

Store HTML is the fragile part. A page change can break the selectors. Keeping extraction separate from storage helps me find the problem and adjust the parser.

04 / RESULT

More than 3,000 products in the original run.

The collector gathered more than 3,000 products in the original run. The bot lets you search for an item and compare its current and lowest recorded prices. Making the query work meant handling collection, data modeling and the Telegram response.

Want to work together?

Send email