redfin-real-estate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRedfin Real Estate Query Skill
Redfin房产查询Skill
This skill enables querying Redfin.com for real estate property data using web scraping.
该Skill通过网页爬取功能,可查询Redfin.com上的房产数据。
When to Use This Skill
适用场景
Use this skill when the user wants to:
- Find homes for sale in a specific city, zip code, or address
- Get current property prices and listings
- Search for real estate with filters (price range, beds, baths, property type)
- Look up property details like square footage, year built, listing status
当用户有以下需求时,可使用该Skill:
- 查找特定城市、邮政编码或地址范围内的待售房屋
- 获取当前房产价格和房源信息
- 结合筛选条件(价格区间、卧室数、浴室数、房产类型)搜索房产
- 查询房产详细信息,如建筑面积、建造年份、房源状态
Prerequisites
前置要求
Before using, ensure dependencies are installed:
bash
pip install selenium beautifulsoup4 webdriver-manager pandas使用前,请确保已安装以下依赖:
bash
pip install selenium beautifulsoup4 webdriver-manager pandasUsage
使用方法
Basic Syntax
基本语法
Find homes for sale in [location]
Find properties in [location] under $[price]
Search [location] with [beds]+ beds and [baths]+ baths
Show me [property type] listings in [location]查找[地点]的待售房屋
查找[地点]价格低于$[金额]的房产
搜索[地点]带[beds]+卧室和[baths]+浴室的房产
展示[地点]的[房产类型]房源Important: Use Zipcodes
重要提示:使用邮政编码
For best results, use zipcodes instead of city names. Redfin's URL structure works best with zipcodes.
✅ Good: --location "78701"
✅ Good: --location "90210"
❌ Less reliable: --location "Austin TX"为获得最佳结果,请使用邮政编码而非城市名称。 Redfin的URL结构对邮政编码的支持效果最佳。
✅ 推荐: --location "78701"
✅ 推荐: --location "90210"
❌ 可靠性较低: --location "Austin TX"Examples
示例
undefinedundefinedUsing zipcode (recommended)
使用邮政编码(推荐)
Find homes for sale in 78701
Find properties in 78701 under $500000
Search 78701 with 3 beds
查找78701地区的待售房屋
查找78701地区价格低于$500000的房产
搜索78701地区带3卧室的房产
City names may not work as well
城市名称的效果可能不佳
Find homes for sale in Austin TX (may not return results)
undefined查找Austin TX地区的待售房屋 (可能无法返回结果)
undefinedParameters
参数说明
| Argument | Description | Example |
|---|---|---|
| Zipcode (recommended) or city | |
| Minimum price | |
| Maximum price | |
| Minimum bedrooms | |
| Minimum bathrooms | |
| house, condo, townhouse, land, multi-family | |
| Number of results (default: 10) | |
Note: Price and bed/bath filters work best with zipcode-based searches. City name searches may return limited or no filtered results.
The scraper uses:
- Selenium with Chrome headless browser
- BeautifulSoup for HTML parsing
- Pandas for data formatting
- Human-like delays to avoid blocking
| 参数 | 描述 | 示例 |
|---|---|---|
| 邮政编码(推荐)或城市 | |
| 最低价格 | |
| 最高价格 | |
| 最少卧室数 | |
| 最少浴室数 | |
| 房产类型:house, condo, townhouse, land, multi-family | |
| 结果数量(默认:10) | |
注意: 价格和卧室/浴室筛选条件在基于邮政编码的搜索中效果最佳。基于城市名称的搜索可能返回有限或无筛选结果。
该爬取工具使用以下技术:
- 搭配Chrome无头浏览器的Selenium
- 用于HTML解析的BeautifulSoup
- 用于数据格式化的Pandas
- 类人类请求延迟,避免被拦截
Script Location
脚本位置
~/.agents/skills/redfin-real-estate/scripts/scraper.py~/.agents/skills/redfin-real-estate/scripts/scraper.pyRunning the Scraper
运行爬取工具
The agent should run the scraper with appropriate parameters. Example invocation:
bash
python ~/.agents/skills/redfin-real-estate/scripts/scraper.py --location "78701" --limit 10Agent应使用合适的参数运行该爬取工具。调用示例:
bash
python ~/.agents/skills/redfin-real-estate/scripts/scraper.py --location "78701" --limit 10Available Command Line Arguments
可用命令行参数
| Argument | Description | Example |
|---|---|---|
| Zipcode (recommended) or city name | |
| Minimum price | |
| Maximum price | |
| Minimum bedrooms | |
| Minimum bathrooms | |
| house, condo, townhouse, land, multi-family | |
| Number of results (default: 10) | |
| 参数 | 描述 | 示例 |
|---|---|---|
| 邮政编码(推荐)或城市名称 | |
| 最低价格 | |
| 最高价格 | |
| 最少卧室数 | |
| 最少浴室数 | |
| 房产类型:house, condo, townhouse, land, multi-family | |
| 结果数量(默认:10) | |
Output Format
输出格式
Results display as a formatted table in the terminal:
╔══════════════════════════════════════════════════════════════════════════════╗
║ REDFIN PROPERTY SEARCH RESULTS ║
╠══════════════════════════════════════════════════════════════════════════════╣
║ Address │ Price │ Beds │ Baths │ Sqft │ Year ║
╠══════════════════════════════════════════════════════════════════════════════╣
║ 123 Main St, Austin, TX │ $450,000 │ 3 │ 2 │ 1,850 │ 2015 ║
║ 456 Oak Ave, Austin, TX │ $525,000 │ 4 │ 3 │ 2,200 │ 2018 ║
╚══════════════════════════════════════════════════════════════════════════════╝结果将在终端中以格式化表格形式展示:
╔══════════════════════════════════════════════════════════════════════════════╗
║ REDFIN PROPERTY SEARCH RESULTS ║
╠══════════════════════════════════════════════════════════════════════════════╣
║ Address │ Price │ Beds │ Baths │ Sqft │ Year ║
╠══════════════════════════════════════════════════════════════════════════════╣
║ 123 Main St, Austin, TX │ $450,000 │ 3 │ 2 │ 1,850 │ 2015 ║
║ 456 Oak Ave, Austin, TX │ $525,000 │ 4 │ 3 │ 2,200 │ 2018 ║
╚══════════════════════════════════════════════════════════════════════════════╝Limitations
限制说明
- Terms of Service: Web scraping Redfin technically violates their ToS. Use responsibly.
- Rate Limiting: Redfin may block IP addresses that make too many requests. The scraper includes delays to mitigate this.
- Dynamic Content: Site structure changes may occasionally break the scraper.
- No Guarantee: This is an unofficial method with no uptime guarantees.
- Filters: Price/bed/bath filters work best with zipcode-based searches. City name searches may return limited results.
- Use Zipcodes: For reliable results, always use zipcodes (e.g., "78701") instead of city names.
- 服务条款:网页爬取Redfin的行为在技术上违反其服务条款,请谨慎使用。
- 请求频率限制:Redfin可能会拦截请求过于频繁的IP地址。该爬取工具已内置延迟机制以缓解此问题。
- 动态内容:网站结构变更可能会导致爬取工具偶尔失效。
- 无服务保障:这是非官方方法,不提供可用性保障。
- 筛选效果:价格/卧室/浴室筛选条件在基于邮政编码的搜索中效果最佳。基于城市名称的搜索可能返回有限结果。
- 使用邮政编码:为获得可靠结果,请始终使用邮政编码(如"78701")而非城市名称。
Error Handling
错误处理
If scraping fails:
- Check internet connection
- Redfin may be blocking requests (wait and retry)
- Site structure may have changed (may need script updates)
- Verify location format is valid
若爬取失败:
- 检查网络连接
- Redfin可能拦截了请求(请等待后重试)
- 网站结构可能已变更(可能需要更新脚本)
- 验证地点格式是否有效
Best Practices
最佳实践
- Add delays between requests (built into script)
- Don't make excessive queries in short time period
- Use specific locations rather than broad searches
- Filter results server-side with parameters when possible
- 在请求之间添加延迟(已内置到脚本中)
- 短时间内不要发起过多查询
- 使用具体地点而非宽泛的搜索范围
- 尽可能通过参数在服务器端筛选结果