{"id":22851988,"url":"https://github.com/thivyashreens/pat-task-10","last_synced_at":"2026-05-09T16:13:04.233Z","repository":{"id":267415662,"uuid":"901172272","full_name":"ThivyashreeNS/PAT-Task-10","owner":"ThivyashreeNS","description":"Extracting the follower and following counts from an Instagram profile","archived":false,"fork":false,"pushed_at":"2024-12-10T10:50:32.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T06:46:05.922Z","etag":null,"topics":["automation-testing","pytest","python","selenium","selenium-webdriver"],"latest_commit_sha":null,"homepage":"https://www.instagram.com/guviofficial/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThivyashreeNS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-10T07:07:54.000Z","updated_at":"2024-12-10T10:50:36.000Z","dependencies_parsed_at":"2024-12-10T08:36:06.465Z","dependency_job_id":null,"html_url":"https://github.com/ThivyashreeNS/PAT-Task-10","commit_stats":null,"previous_names":["thivyashreens/pat-task-10"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ThivyashreeNS/PAT-Task-10","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThivyashreeNS%2FPAT-Task-10","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThivyashreeNS%2FPAT-Task-10/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThivyashreeNS%2FPAT-Task-10/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThivyashreeNS%2FPAT-Task-10/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThivyashreeNS","download_url":"https://codeload.github.com/ThivyashreeNS/PAT-Task-10/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThivyashreeNS%2FPAT-Task-10/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281107100,"owners_count":26444787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation-testing","pytest","python","selenium","selenium-webdriver"],"created_at":"2024-12-13T06:06:43.275Z","updated_at":"2025-10-26T12:42:20.265Z","avatar_url":"https://github.com/ThivyashreeNS.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Extracting Instagram Follower and Following Counts\n\n## Overview:\nThis script automates the process of extracting the follower and following counts from an Instagram profile using Selenium WebDriver.\n\n## Table of Contents:\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Project Structure](#project-structure)\n- [Code Explanation](#Code-Explanation)\n- [Running the test](#Running-the-test)\n\n## Prerequisites\n- Python 3.x\n- Required libraries:\n  - `selenium`\n  - `pytest`\n  - `webdriver-manager`\n \n ## Installation:\nTo successfully set up and run the Selenium Automation Testing Project, follow these steps:\n\n1. Ensure that you have Python 3.x installed on your machine. You can download it from  [python.org](https://www.python.org/).\n\n2. Familiarity with command-line interface (CLI) tools is recommended for executing commands.\n\n3. Set Up a Virtual Environment (Optional but Recommended):\n   - It's best practice to create a virtual environment to manage dependencies for your project:\n     \n     - Verify Python Virtual Environment: `Virtualenv --version`\n       \n     - Create Virtual Environment:  `virtualenv cd`\n       \n     - Activate Virtual Environment:  `Scripts\\Activate`\n       \n     - Deactivate Virtual Environment: `Scripts\\Deactivate`\n       \n4.  Install Required Libraries:\n    - Install the necessary Python libraries using pip. The required libraries for this project include:\n      - __Selenium :__ For web browser automation.\n        Install Python Selenium Module: `pip install selenium`\n        \n      - __Pytest :__ For running test cases and managing test execution.\n        `pip install pytest`\n         Pytest Report: `pip install pytest-html`\n        \n      - __Webdriver-manager :__ To automatically manage browser drivers.\n          Install WebDriver Manager Module: `pip install webdriver-manager`\n\n## Project Structure\n```\nPAT Task 10/\n│\n├── Task_10.py                      # Contains the main logic for  interacting with Instagram using Selenium.\n├── test_InstaCounts.py             # Contains the test case using pytest to checks if the follower and following counts are correctly extracted.\n├── instaCounts.html                # Pytest html report\n└── README.md                       # This README file\n```\n\n## Code Explanation\n### Task_10.py\nThis script contains the main logic for automating the drag-and-drop task using Selenium.\n\n- __Data class:__ Contains the url of the Instagram profile to scrape.\n\n- __Locators class:__ Stores the XPath expressions for various elements on the Instagram profile page, such as the close button, the black ribbon, and the follower/following counts.\n\n- __InstaCounts Class:__ The InstaCounts class handles the extraction of follower and following counts.\n\n### Methods in `InstaCounts` class:\n- __extract_counts():__\n   - Initializes a Chrome WebDriver and opens the Instagram profile URL.\n\n  - Handles waiting for and interacting with various page elements (closing modals and extracting the follower and following counts).\n\n  - Returns the extracted counts as strings.\n\n### test_InstaCounts.py:\n- __test_extract_counts():__\n  \n  - Instantiate the InstaCounts class.\n\n  - Call the extract_counts() method that returns the follower and following counts.\n\n  -  It checks if the follower and following counts are correctly extracted.\n\n## Running the test:\n- The project uses pytest to test the extracted counts. To run the tests:\n  \n  - Make sure the project and dependencies are properly set up.\n\n  - Run the following command to execute the test cases:\n    ```\n     pytest -v -s --capture=sys --html=Reports\\instaCounts.html test_InstaCounts.py\n    ```\n    \n\n\n\n\n\n\n\n\n        \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthivyashreens%2Fpat-task-10","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthivyashreens%2Fpat-task-10","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthivyashreens%2Fpat-task-10/lists"}