A Bah and Python-based project to fetch, store, and convert MCI (Iran Mobile Communications) sim card product data into Excel format.
- Fetch product data from MCI API using
fetch.sh(Bash script). - Save each page of results as separate JSON files in the
data/directory. - Convert all JSON files into a single Excel file (
products.xlsx) usingexcel.py. - Automatically handles product attributes and appends them to the Excel file.
mci-simcards/
├─ data/ # Directory containing JSON files fetched from the API
├─ excel.py # Python script to convert JSON files to Excel
├─ fetch.sh # Bash script to fetch JSON pages from MCI API
├─ products.xlsx # Generated Excel file with all products
├─ .gitignore
├─ LICENSE
└─ README.md
- Python 3.10+
openpyxllibrary (for Excel export)
Install dependencies using pip:
pip install openpyxl-
Fetch data from MCI API
Run the fetch script to download product pages as JSON:
bash fetch.sh
-
Convert JSON data to Excel
Run the Python script:
python excel.py
Output will be saved as
products.xlsx.
- The Python script automatically ignores empty or invalid JSON files.
- Product attributes are concatenated with a
;separator in the Excel sheet.
This project is licensed under the MIT License. See the LICENSE file for details.
Copyright 2025, Max Base