{"id":23774638,"url":"https://github.com/chathumiamarasinghe/web-scraping","last_synced_at":"2026-01-29T03:02:35.554Z","repository":{"id":257467362,"uuid":"858360161","full_name":"chathumiamarasinghe/web-scraping","owner":"chathumiamarasinghe","description":"A versatile Python script for scraping data from websites. This script automates data extraction, processes the information, and saves it in a structured format like CSV. Ideal for data collection, research, and analysis tasks.","archived":false,"fork":false,"pushed_at":"2024-09-17T02:46:47.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T20:52:44.619Z","etag":null,"topics":["beautifulsoup","csv-export","dataextraction","phyton","pythonwebscraper","webscraping"],"latest_commit_sha":null,"homepage":"","language":"Python","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/chathumiamarasinghe.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,"zenodo":null}},"created_at":"2024-09-16T18:57:48.000Z","updated_at":"2024-12-24T18:22:27.000Z","dependencies_parsed_at":"2025-04-12T19:07:51.923Z","dependency_job_id":"db72da7e-6faf-46df-88e3-3996a07b09b9","html_url":"https://github.com/chathumiamarasinghe/web-scraping","commit_stats":null,"previous_names":["chathumiamarasinghe/web-scrapping","chathumiamarasinghe/web-scraping"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chathumiamarasinghe/web-scraping","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chathumiamarasinghe%2Fweb-scraping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chathumiamarasinghe%2Fweb-scraping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chathumiamarasinghe%2Fweb-scraping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chathumiamarasinghe%2Fweb-scraping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chathumiamarasinghe","download_url":"https://codeload.github.com/chathumiamarasinghe/web-scraping/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chathumiamarasinghe%2Fweb-scraping/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28861653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"online","status_checked_at":"2026-01-29T02:00:06.714Z","response_time":59,"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":["beautifulsoup","csv-export","dataextraction","phyton","pythonwebscraper","webscraping"],"created_at":"2025-01-01T06:16:13.433Z","updated_at":"2026-01-29T03:02:35.517Z","avatar_url":"https://github.com/chathumiamarasinghe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Academic Staff Scraper\n\nThis Python script scrapes academic staff information from the Faculty of Science, University of Kelaniya's website, specifically the staff details page. The script retrieves each staff member's name, position, room number, phone, fax, email, and specialization (if available) and exports the information into a CSV file.\n\n## Prerequisites\n\nMake sure you have the following Python packages installed before running the script:\n\n- `requests`: For sending HTTP requests to fetch the webpage.\n- `beautifulsoup4`: For parsing the HTML content of the webpage.\n- `csv`: For writing the extracted data to a CSV file.\n\nYou can install the required packages using `pip`:\n## How It Works\n\n- **Extract Data from URL**: The script sends a request to the webpage containing the academic staff details.\n- **Parse HTML**: It uses BeautifulSoup to parse the HTML and identify the relevant sections for staff data.\n- **Retrieve Staff Information**: For each academic staff member, the script extracts:\n  - Name\n  - Position\n  - Room number\n  - Phone number\n  - Fax\n  - Email\n  - Specialization (scraped from a link if available)\n- **CSV Output**: The data is written to a CSV file named `academic_staff.csv`.\n\n## Example Output\n\n-\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eName\u003c/th\u003e\n      \u003cth\u003ePosition\u003c/th\u003e\n      \u003cth\u003eRoom\u003c/th\u003e\n      \u003cth\u003ePhone\u003c/th\u003e\n      \u003cth\u003eFax\u003c/th\u003e\n      \u003cth\u003eEmail\u003c/th\u003e\n      \u003cth\u003eSpecialization\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eProf.Janaka Wijanayake\u003c/td\u003e\n      \u003ctd\u003eProfessorr\u003c/td\u003e\n      \u003ctd\u003eRoom 201\u003c/td\u003e\n      \u003ctd\u003e011-2233445\u003c/td\u003e\n      \u003ctd\u003e011-2233446\u003c/td\u003e\n      \u003ctd\u003ejanaka@stu.kln.ac.lk\u003c/td\u003e\n      \u003ctd\u003eComputer Science\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eDr. Thilini Mahanama\u003c/td\u003e\n      \u003ctd\u003eSenior Lecture\u003c/td\u003e\n      \u003ctd\u003eRoom 202\u003c/td\u003e\n      \u003ctd\u003e011-1234567\u003c/td\u003e\n      \u003ctd\u003eNot available\u003c/td\u003e\n      \u003ctd\u003ethilinie@uni.lk\u003c/td\u003e\n      \u003ctd\u003ePhysics\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\n## Usage\n\n1. Clone or download the repository containing this script.\n2. Make sure you have Python installed on your system.\n3. Install the required Python libraries using the following command:\n   ```bash\n   pip install requests beautifulsoup4\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchathumiamarasinghe%2Fweb-scraping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchathumiamarasinghe%2Fweb-scraping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchathumiamarasinghe%2Fweb-scraping/lists"}