redfin-scraper


Nameredfin-scraper JSON
Version 0.2.2 PyPI version JSON
download
home_page
SummaryA Python library used to scrape data from Redfin.com using the unofficial Stringray API.
upload_time2023-08-01 20:44:53
maintainer
docs_urlNone
author
requires_python>=3.9
licenseMIT License Copyright (c) 2023 Ryan Sherby Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords scraper scraping redfin real estate data housing houses
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Redfin Scraper

## Description
A scalable Python library that leverages Redfin's unofficial Stringray API to quickly scrape real estate data.

## One-Time Setup
### Zip Code Database
> A database of zip codes is required to search for City, State values  

> It is strongly recommended to download this [free](https://www.unitedstateszipcodes.org/zip-code-database/#) version in .csv format
### The Config
> Parameters for the RedfinScraper class can be controlled using an optional `config.json` file  

> [Sample Config](https://github.com/ryansherby/RedfinScraper/blob/main/config.json)



## Getting Started
### Installation
`pip3 install -U redfin-scraper`

### Import Module
`from redfin_scraper import RedfinScraper`  

### Initialize Module
`scraper = RedfinScraper()`

## Using The Scraper
### Required Setup
`scraper.setup(zip_database_path:str, multiprocessing:bool=False)`

> **zip_database_path**: Binary path to the zip_code_database.csv  

> **multiprocessing**: Allow for multiprocessing

### Activating The Scraper
`scraper.scrape(city_states:list[str]=None, zip_codes:list[str], sold:bool=False, sale_period:str=None, lat_tuner:float=1.5, lon_tuner:float=1.5)`
>**city_states**: List of strings representing US cities formatted as "City, State"  

>**zip_codes**: List of strings representing US zip codes  

>**sold**: Select whether to scrape for-sale data (default) or sold data  

>**sale_period**: Must be selected whenever sold is True (1mo, 3mo, 6mo, 1yr, 3yr, 5yr)

>**lat_tuner**: Represents # of standard deviations beyond the local latitude average that a zip code may exist within   

>**lon_tuner**: Represents # of standard deviations beyond the local longitude average that a zip code may exist within  

### Accessing Prior Scrapes
`scraper.get_data(id:str)`
>**id**: IDs are indexed at 1 and increase in the format "D00#"

## Appendix
### Warnings
> Multiprocessing can result in the consumption of all available CPU resources for an extended period of time  

> Unethical use of this library can result in Redfin taking disciplinary action against your IP address  

### Recommendations
> Requests for large amounts of data (# of zip codes > 2,000) should be split into separate requests  

> The `package.log` file can be used to investigate unexpected results

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "redfin-scraper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "scraper,scraping,Redfin,real estate,data,housing,houses",
    "author": "",
    "author_email": "Ryan Sherby <ryan.m.sherby@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b4/45/1f701903f620313e8651043e76801f2f736b53edf33d5a3df99a70332789/redfin-scraper-0.2.2.tar.gz",
    "platform": null,
    "description": "\ufeff# Redfin Scraper\r\n\r\n## Description\r\nA scalable Python library that leverages Redfin's unofficial Stringray API to quickly scrape real estate data.\r\n\r\n## One-Time Setup\r\n### Zip Code Database\r\n> A database of zip codes is required to search for City, State values  \r\n\r\n> It is strongly recommended to download this [free](https://www.unitedstateszipcodes.org/zip-code-database/#) version in .csv format\r\n### The Config\r\n> Parameters for the RedfinScraper class can be controlled using an optional `config.json` file  \r\n\r\n> [Sample Config](https://github.com/ryansherby/RedfinScraper/blob/main/config.json)\r\n\r\n\r\n\r\n## Getting Started\r\n### Installation\r\n`pip3 install -U redfin-scraper`\r\n\r\n### Import Module\r\n`from redfin_scraper import RedfinScraper`  \r\n\r\n### Initialize Module\r\n`scraper = RedfinScraper()`\r\n\r\n## Using The Scraper\r\n### Required Setup\r\n`scraper.setup(zip_database_path:str, multiprocessing:bool=False)`\r\n\r\n> **zip_database_path**: Binary path to the zip_code_database.csv  \r\n\r\n> **multiprocessing**: Allow for multiprocessing\r\n\r\n### Activating The Scraper\r\n`scraper.scrape(city_states:list[str]=None, zip_codes:list[str], sold:bool=False, sale_period:str=None, lat_tuner:float=1.5, lon_tuner:float=1.5)`\r\n>**city_states**: List of strings representing US cities formatted as \"City, State\"  \r\n\r\n>**zip_codes**: List of strings representing US zip codes  \r\n\r\n>**sold**: Select whether to scrape for-sale data (default) or sold data  \r\n\r\n>**sale_period**: Must be selected whenever sold is True (1mo, 3mo, 6mo, 1yr, 3yr, 5yr)\r\n\r\n>**lat_tuner**: Represents # of standard deviations beyond the local latitude average that a zip code may exist within   \r\n\r\n>**lon_tuner**: Represents # of standard deviations beyond the local longitude average that a zip code may exist within  \r\n\r\n### Accessing Prior Scrapes\r\n`scraper.get_data(id:str)`\r\n>**id**: IDs are indexed at 1 and increase in the format \"D00#\"\r\n\r\n## Appendix\r\n### Warnings\r\n> Multiprocessing can result in the consumption of all available CPU resources for an extended period of time  \r\n\r\n> Unethical use of this library can result in Redfin taking disciplinary action against your IP address  \r\n\r\n### Recommendations\r\n> Requests for large amounts of data (# of zip codes > 2,000) should be split into separate requests  \r\n\r\n> The `package.log` file can be used to investigate unexpected results\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Ryan Sherby  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A Python library used to scrape data from Redfin.com using the unofficial Stringray API.",
    "version": "0.2.2",
    "project_urls": {
        "Homepage": "https://github.com/ryansherby/RedfinScraper"
    },
    "split_keywords": [
        "scraper",
        "scraping",
        "redfin",
        "real estate",
        "data",
        "housing",
        "houses"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "18a1ae2f6ac8b10b09cf15d5ed4f73c275294a38a54cd8ea2f631376bc4673b2",
                "md5": "eabc68f903d9ad3d0dd423c4bed4fb81",
                "sha256": "4a5a270921c120128941a91e4c901687bf008ce91b1e56359a1e188ef161f159"
            },
            "downloads": -1,
            "filename": "redfin_scraper-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eabc68f903d9ad3d0dd423c4bed4fb81",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 9889,
            "upload_time": "2023-08-01T20:44:52",
            "upload_time_iso_8601": "2023-08-01T20:44:52.065310Z",
            "url": "https://files.pythonhosted.org/packages/18/a1/ae2f6ac8b10b09cf15d5ed4f73c275294a38a54cd8ea2f631376bc4673b2/redfin_scraper-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b4451f701903f620313e8651043e76801f2f736b53edf33d5a3df99a70332789",
                "md5": "c017f9756dd3b5e2c511b976d73dd0d2",
                "sha256": "485cfdb638a001f4d6505e9b006e94d54af5cdb1f1997eec04afa46f746610ee"
            },
            "downloads": -1,
            "filename": "redfin-scraper-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c017f9756dd3b5e2c511b976d73dd0d2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 9994,
            "upload_time": "2023-08-01T20:44:53",
            "upload_time_iso_8601": "2023-08-01T20:44:53.638986Z",
            "url": "https://files.pythonhosted.org/packages/b4/45/1f701903f620313e8651043e76801f2f736b53edf33d5a3df99a70332789/redfin-scraper-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-01 20:44:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ryansherby",
    "github_project": "RedfinScraper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "redfin-scraper"
}
        
Elapsed time: 0.11810s