Skip to content

A Python script uses Selenium to scrape data from the MCI (Mobile Telecommunication Company of Iran) website to collect information about the internet coverage status for various regions in Iran

License

Notifications You must be signed in to change notification settings

amasoudfam/MCI-Internet-Coverage

Repository files navigation

MCI Internet Coverage Status Web Scraper

This Python script uses Selenium to scrape data from the MCI (Mobile Telecommunication Company of Iran) website to collect information about the internet coverage status for various regions in Iran. The data is then saved to an Excel file for further analysis.

MCI Internet Coverage

Getting Started

These instructions will help you set up and run the web scraping script on your local machine. You can use different web browsers, not limited to Chrome, depending on your preference.

Prerequisites

  • Python: Make sure you have Python installed on your system. You can download it from the Python official website.

  • Required Python packages: You can install the necessary Python packages using pip:

    pip install -r requirements.txt

Usage

  1. Clone the repository to your local machine.

    git clone https://github.com/amasoudfam/MCI-Internet-Coverage.git
  2. Move into the project directory.

    cd MCI-Internet-Coverage
  3. Run the Python script.

    python MCI_internet_coverage.py
  4. The script will scrape the data and save it in an Excel file named MCI_internet_coverage.xlsx in the same directory.

Please Note: There is no need to add executable webdriver file in the code directory in selenium v4.6.0 or above. Selenium Manager will download the webdriver automatically.

For the lower selenium versions, the WebDriver file (e.g., chromedriver for Chrome) must be placed in the same directory as the Python script (MCI_internet_coverage.py) for the script to work correctly. You can download the webdriver via links below. Make sure the WebDriver version matches your web browser.

Data Format

The scraped data is saved in an Excel file with the following columns:

  • Province
  • Region
  • Status (Internet Coverage Status)
  • 3G (1 if 3G is available, 0 otherwise)
  • 4G (1 if 4G is available, 0 otherwise)
  • 4.5G (1 if 4.5G is available, 0 otherwise)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

This project is not affiliated with or endorsed by MCI (Mobile Telecommunication Company of Iran).

Learn More About Web Scraping and Selenium

Important Note (Last Updated: October 23, 2023)

This web scraping script is designed to work with the current design and structure of the MCI website as of October 23, 2023. Websites may undergo updates or changes in design over time, which can impact the script's functionality. If you encounter issues with the script, especially after changes to the MCI website, you may need to adapt the script to match the new structure.

About

A Python script uses Selenium to scrape data from the MCI (Mobile Telecommunication Company of Iran) website to collect information about the internet coverage status for various regions in Iran

Topics

Resources

License

Stars

Watchers

Forks

Languages