{"id":23921792,"url":"https://github.com/jatindhiman05/Web-Scraping","last_synced_at":"2026-07-01T18:30:18.070Z","repository":{"id":246941593,"uuid":"824388010","full_name":"Jatindhiman05/Web-Scraping","owner":"Jatindhiman05","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-10T16:28:35.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T19:19:03.379Z","etag":null,"topics":["python","scraping-websites","web-scraping","web-scraping-python"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/Jatindhiman05.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-07-05T03:10:12.000Z","updated_at":"2024-08-09T12:53:07.000Z","dependencies_parsed_at":"2024-07-10T19:17:38.392Z","dependency_job_id":null,"html_url":"https://github.com/Jatindhiman05/Web-Scraping","commit_stats":null,"previous_names":["jatindhimann/web-scraping","jatindh05/web-scraping","jatindhiman05/web-scraping"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jatindhiman05%2FWeb-Scraping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jatindhiman05%2FWeb-Scraping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jatindhiman05%2FWeb-Scraping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jatindhiman05%2FWeb-Scraping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jatindhiman05","download_url":"https://codeload.github.com/Jatindhiman05/Web-Scraping/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240385199,"owners_count":19792980,"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","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":["python","scraping-websites","web-scraping","web-scraping-python"],"created_at":"2025-01-05T16:25:57.886Z","updated_at":"2026-07-01T18:30:17.976Z","avatar_url":"https://github.com/Jatindhiman05.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Repositories Scraper\n\nThis Python script scrapes data from GitHub repositories and saves the information to a CSV file.\n\n## Features\n\n- Retrieves the repository name, number of stars, number of forks, and the repository URL.\n- Supports scraping from a single repository URL or a search page with multiple repositories.\n- Saves the scraped data to a CSV file named `repository_info.csv`.\n\n## Dependencies\n\nThe script requires the following Python libraries:\n\n- `requests`: for making HTTP requests to GitHub.\n- `BeautifulSoup`: for parsing the HTML content of the GitHub pages.\n- `pandas`: for storing and saving the scraped data in a CSV format.\n\n## Functions\n\n- get_repo_name(doc): Extracts the repository names from the HTML document.\n- get_stars(doc): Extracts the number of stars for each repository.\n- get_forks(doc): Extracts the number of forks for each repository.\n- get_repo_url(doc, base_url): Constructs the full repository URLs based on the base URL.\n- scrape_github_id(repo_url): Scrapes data for a single repository URL and returns a pandas DataFrame.\n- Mega_scrape(repo_url): Scrapes data for a search page with multiple repositories and saves the results to a CSV file.\n\n## Run Code\n\n``Mega_scrape('https://github.com/search?q=topic%3Apython\u0026type=Repositories')`` \u003cbr\u003e\nThis will scrape data for all the repositories displayed on the search page and save the results to a CSV file named repository_info.csv.\n\n``df = scrape_github_id('https://github.com/pandas-dev/pandas')`` \u003cbr\u003e\nThis will scrape data for the specified repository and return a pandas DataFrame.\n\n## Notes\n\n- The script assumes that the GitHub page structure remains consistent. If the HTML layout changes, the script may need to be updated accordingly.\n- The script currently supports scraping up to 30 repositories per page. If the search results exceed 30 repositories, the script will automatically navigate to the next       page and continue scraping.\n- The scraped data is saved to a CSV file named repository_info.csv in the same directory as the script.\n\n  # GitHub Topics Scraper\n\n- We're going to scrape https://github.com/topics\n- We'll get a list of topics. For each topic, we'll get topic title, topic page URL and topic description\n- For each topic, we'll get the top 25 repositories in the topic from the topic page\n- For each repository, we'll grab the repo name, username, stars and repo URL\n- For each topic we'll create a CSV file in the following format:\n- Repo Name,Username,Stars,Repo URL \u003cbr\u003e\n  \n  `three.js,mrdoob,69700,https://github.com/mrdoob/three.js`\n  `libgdx,libgdx,18300,https://github.com/libgdx/libgdx`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjatindhiman05%2FWeb-Scraping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjatindhiman05%2FWeb-Scraping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjatindhiman05%2FWeb-Scraping/lists"}