# Koreancar: Python Module for Encar.com Integration
**Koreancar** is a Python library designed for seamless interaction with [Encar.com](https://www.encar.com), a leading automotive marketplace in Korea. Developed by [Unrealos](https://unrealos.com), this library simplifies fetching and processing car listings, vehicle details, and related automotive data, making it an ideal solution for dealerships, analytics platforms, and developers working on car-related SaaS, PaaS, and web services.
---
## Features
- **Retrieve Car Listings**: Easily fetch paginated car listings with comprehensive details such as price, mileage, year, and model.
- **Detailed Vehicle Data**: Extract performance inspections, diagnostic information, warranty options, and more.
- **Structured JSON Data**: Organizes fetched data into easy-to-access JSON files for seamless integration into your projects.
- **Robust and Scalable**: Handles large datasets with error handling and retry mechanisms for reliable data fetching.
- **Customizable Workflow**: Tailor the library to meet your specific business needs, whether for SEO, analytics, or marketplace integration.
---
## Installation
Install the module via [PyPI](https://pypi.org/project/koreancar/):
```bash
pip install koreancar
```
---
## Quick Start Guide
### Fetch Car Listings and Detailed Vehicle Data
```python
import os
import json
from koreancar.main import CarListingParser, VehicleMainFetcher, VehicleDataFetcher
# Define directories for storing data
data_list_dir = "data/list"
data_vehicles_dir = "data/vehicles"
# Step 1: Fetch car listings
parser = CarListingParser(output_dir=data_list_dir, items_per_page=10)
parser.parse_pages(3) # Fetch 3 pages of car listings
# Step 2: Process car listings to fetch main vehicle data
fetcher = VehicleMainFetcher(input_dir=data_list_dir, output_dir=data_vehicles_dir)
fetcher.process_all_files()
# Step 3: Fetch additional details for each listing dynamically
with open(os.path.join(data_list_dir, "page_0.json"), "r", encoding="utf-8") as f:
listings = json.load(f)["SearchResults"]
for listing in listings:
listing_id = listing.get("Id")
if listing_id:
print(f"Processing vehicle data for listing ID: {listing_id}")
vehicle_data_fetcher = VehicleDataFetcher(output_dir=data_vehicles_dir)
vehicle_data_fetcher.process_vehicle_data(listing_id)
print("Data fetching and processing completed.")
```
---
## Directory Structure
After running the module, data is organized into the following directories:
- **`data/list`**: Contains paginated car listing files (`page_0.json`, `page_1.json`, etc.).
- **`data/vehicles`**: Contains directories for individual vehicles, identified by their listing ID, with the following files:
- **`main.json`**: Core vehicle details.
- **`history.json`**: Vehicle history records.
- **`inspection.json`**: Performance inspection data.
- **`diagnosis.json`**: Diagnostic details.
- **`clean_encar.json`**: Cleaned Encar data.
- **`vehicle_options.json`**: Available vehicle options.
- **`extend_warranty.json`**: Extended warranty information.
- **`vehicle_category.json`**: Category and manufacturer data.
---
## Use Cases
- **Automotive Marketplaces**: Build and maintain dynamic, up-to-date car listings.
- **Analytics Platforms**: Aggregate and analyze automotive data for market research and insights.
- **Car Dealership SaaS**: Automate inventory management with detailed vehicle information.
- **SEO Optimization**: Enhance automotive content with rich, structured data to improve search engine visibility.
---
## About Unrealos
[Koreancar](https://github.com/markolofsen/koreancar) was developed by **[Unrealos](https://unrealos.com)**, a company specializing in SaaS, PaaS, and web services. Unrealos integrates AI and cutting-edge technologies to deliver innovative solutions for businesses. For inquiries, contact us at [m@unrealos.com](mailto:m@unrealos.com).
---
## License
This project is licensed under the MIT License. See the [LICENSE](https://github.com/markolofsen/koreancar/blob/main/LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": "https://github.com/markolofsen/koreancar",
"name": "koreancar",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "koreancar, encar, vehicle-data, API, python-library",
"author": "Unrealos",
"author_email": "m@unrealos.com",
"download_url": "https://files.pythonhosted.org/packages/f6/ec/08bbe9cddcb85a43f4981c3a472d1f042ad105b5232f0a40c56678603b7a/koreancar-1.0.0.tar.gz",
"platform": null,
"description": "# Koreancar: Python Module for Encar.com Integration\n\n**Koreancar** is a Python library designed for seamless interaction with [Encar.com](https://www.encar.com), a leading automotive marketplace in Korea. Developed by [Unrealos](https://unrealos.com), this library simplifies fetching and processing car listings, vehicle details, and related automotive data, making it an ideal solution for dealerships, analytics platforms, and developers working on car-related SaaS, PaaS, and web services.\n\n---\n\n## Features\n\n- **Retrieve Car Listings**: Easily fetch paginated car listings with comprehensive details such as price, mileage, year, and model.\n- **Detailed Vehicle Data**: Extract performance inspections, diagnostic information, warranty options, and more.\n- **Structured JSON Data**: Organizes fetched data into easy-to-access JSON files for seamless integration into your projects.\n- **Robust and Scalable**: Handles large datasets with error handling and retry mechanisms for reliable data fetching.\n- **Customizable Workflow**: Tailor the library to meet your specific business needs, whether for SEO, analytics, or marketplace integration.\n\n---\n\n## Installation\n\nInstall the module via [PyPI](https://pypi.org/project/koreancar/):\n\n```bash\npip install koreancar\n```\n\n---\n\n## Quick Start Guide\n\n### Fetch Car Listings and Detailed Vehicle Data\n\n```python\nimport os\nimport json\nfrom koreancar.main import CarListingParser, VehicleMainFetcher, VehicleDataFetcher\n\n# Define directories for storing data\ndata_list_dir = \"data/list\"\ndata_vehicles_dir = \"data/vehicles\"\n\n# Step 1: Fetch car listings\nparser = CarListingParser(output_dir=data_list_dir, items_per_page=10)\nparser.parse_pages(3) # Fetch 3 pages of car listings\n\n# Step 2: Process car listings to fetch main vehicle data\nfetcher = VehicleMainFetcher(input_dir=data_list_dir, output_dir=data_vehicles_dir)\nfetcher.process_all_files()\n\n# Step 3: Fetch additional details for each listing dynamically\nwith open(os.path.join(data_list_dir, \"page_0.json\"), \"r\", encoding=\"utf-8\") as f:\n listings = json.load(f)[\"SearchResults\"]\n for listing in listings:\n listing_id = listing.get(\"Id\")\n if listing_id:\n print(f\"Processing vehicle data for listing ID: {listing_id}\")\n vehicle_data_fetcher = VehicleDataFetcher(output_dir=data_vehicles_dir)\n vehicle_data_fetcher.process_vehicle_data(listing_id)\n\nprint(\"Data fetching and processing completed.\")\n```\n\n---\n\n## Directory Structure\n\nAfter running the module, data is organized into the following directories:\n\n- **`data/list`**: Contains paginated car listing files (`page_0.json`, `page_1.json`, etc.).\n- **`data/vehicles`**: Contains directories for individual vehicles, identified by their listing ID, with the following files:\n - **`main.json`**: Core vehicle details.\n - **`history.json`**: Vehicle history records.\n - **`inspection.json`**: Performance inspection data.\n - **`diagnosis.json`**: Diagnostic details.\n - **`clean_encar.json`**: Cleaned Encar data.\n - **`vehicle_options.json`**: Available vehicle options.\n - **`extend_warranty.json`**: Extended warranty information.\n - **`vehicle_category.json`**: Category and manufacturer data.\n\n---\n\n## Use Cases\n\n- **Automotive Marketplaces**: Build and maintain dynamic, up-to-date car listings.\n- **Analytics Platforms**: Aggregate and analyze automotive data for market research and insights.\n- **Car Dealership SaaS**: Automate inventory management with detailed vehicle information.\n- **SEO Optimization**: Enhance automotive content with rich, structured data to improve search engine visibility.\n\n---\n\n## About Unrealos\n\n[Koreancar](https://github.com/markolofsen/koreancar) was developed by **[Unrealos](https://unrealos.com)**, a company specializing in SaaS, PaaS, and web services. Unrealos integrates AI and cutting-edge technologies to deliver innovative solutions for businesses. For inquiries, contact us at [m@unrealos.com](mailto:m@unrealos.com).\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](https://github.com/markolofsen/koreancar/blob/main/LICENSE) file for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python library for fetching vehicle data from Encar.com.",
"version": "1.0.0",
"project_urls": {
"Company": "https://unrealos.com",
"Documentation": "https://github.com/markolofsen/koreancar",
"Homepage": "https://github.com/markolofsen/koreancar",
"Source": "https://github.com/markolofsen/koreancar"
},
"split_keywords": [
"koreancar",
" encar",
" vehicle-data",
" api",
" python-library"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e709f3b91154c14098b6408e3188fd1be64c48a8010f5c13a56c2384fd2540b2",
"md5": "f8b3c613bad3cfe8537c280981942e39",
"sha256": "33813f7867232f172581cfed93226b6b8cc279123c54bb8a6c581aeb23450354"
},
"downloads": -1,
"filename": "koreancar-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f8b3c613bad3cfe8537c280981942e39",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 10123,
"upload_time": "2024-12-22T10:24:42",
"upload_time_iso_8601": "2024-12-22T10:24:42.780281Z",
"url": "https://files.pythonhosted.org/packages/e7/09/f3b91154c14098b6408e3188fd1be64c48a8010f5c13a56c2384fd2540b2/koreancar-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f6ec08bbe9cddcb85a43f4981c3a472d1f042ad105b5232f0a40c56678603b7a",
"md5": "881359a1ab508b06bfb88f248303c400",
"sha256": "11479bee7390b45dd062f342f99c0309ee246d68ea50b77a263b5692efc57ab2"
},
"downloads": -1,
"filename": "koreancar-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "881359a1ab508b06bfb88f248303c400",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 9258,
"upload_time": "2024-12-22T10:24:45",
"upload_time_iso_8601": "2024-12-22T10:24:45.652381Z",
"url": "https://files.pythonhosted.org/packages/f6/ec/08bbe9cddcb85a43f4981c3a472d1f042ad105b5232f0a40c56678603b7a/koreancar-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-22 10:24:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "markolofsen",
"github_project": "koreancar",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "requests",
"specs": []
},
{
"name": "urllib3",
"specs": []
}
],
"lcname": "koreancar"
}