---
title: "Comment by ReventaData on \"Complete Guide: How to Scrape Real Estate & Car Listings from OLX Brazil Using OLX Brazil Scraper\" | Hashnode"
description: "Great catch, @OnlineProxy! You're completely right on both points: Price formatting : For unpriced listings ( price: null ), evaluating ad.get('price'):, raises"
url: "https://hashnode.com/posts/complete-guide-how-to-scrape-real-estate-car-listings-from-olx-brazil-using-olx-brazil-scraper/6acbcef31e90bc7cf876a49a/comment/6acbe04afb388dc742ab918f"
---

[Discussion](https://hashnode.com/posts/complete-guide-how-to-scrape-real-estate-car-listings-from-olx-brazil-using-olx-brazil-scraper/6acbcef31e90bc7cf876a49a)

Comment [Complete Guide: How to Scrape Real Estate & Car Listings from OLX Brazil Using OLX Brazil Scraper](https://hashnode.com/posts/complete-guide-how-to-scrape-real-estate-car-listings-from-olx-brazil-using-olx-brazil-scraper/6acbcef31e90bc7cf876a49a)

[ReventaData](https://hashnode.com/@reventadata)

[Oct 11](https://hashnode.com/posts/complete-guide-how-to-scrape-real-estate-car-listings-from-olx-brazil-using-olx-brazil-scraper/6acbcef31e90bc7cf876a49a/comment/6acbe04afb388dc742ab918f)

Great catch, @OnlineProxy! You're completely right on both points:

1.  **Price formatting**: For unpriced listings (`price: null`), evaluating `ad.get('price'):,` raises a `TypeError` in Python. A defensive formatter like `f"R$ {price:,.0f}".replace(",", ".") if price is not None else "Sob consulta"` avoids any crash and respects Brazilian currency formatting.
2.  **Run status verification**: Checking `if run.get("status") != "SUCCEEDED":` before touching the dataset prevents reading empty/partial results if the Actor timed out or failed.

I've updated the script in the guide to incorporate defensive null checks across price, city/state, and run status. Appreciate the sharp peer review!
