| [ Web Proxy ] |
| Viewing: https://github-redirect.dependabot.com/Anonym0usWork1221/python-code-docstring-scraper | [Back] [Original] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
View all files | ||||
This project is a GitHub scraper designed to collect Python code from repositories, focusing on code that includes docstrings in functions and classes. The collected data is used to create an extensive dataset for the JaraConverse LLM model created by Abdul Moez.
MIT License
Copyright (c) 2024 AbdulMoez
The GitHub Python Code Scraper automates the process of searching for and scraping Python repositories from GitHub. It focuses on extracting code snippets that contain docstrings, ensuring that the dataset includes well-documented code. The scraper supports multithreading and handles GitHub API rate limits.
To install the required dependencies, run:
pip install -r requirements.txtTo start the scraper, run the following command:
python scraper.pyfrom scraper import Scraper
# Initialize the Scraper object
scraper = Scraper(
search_query="language:python pushed:<2023-01-01",
git_tokens=["your_github_token1", "your_github_token2"],
number_of_threads=4
)
# Start the scraping process
scraper.start_scraper()You can customize the scraper's behavior using the following parameters:
search_query: GitHub search query used to filter repositories.git_tokens: List of GitHub personal access tokens for authentication.id_record_file: File name for storing scraped repository IDs.db_commit_index: Number of records after which the database is committed.width_for_wrap: Width used for wrapping docstrings.verbose: Whether to print verbose status messages.use_threads: Whether to use multiple threads for scraping.number_of_threads: The number of threads to use for scraping.data_base_path: Path where the SQLite database will be stored.data_base_file_name: Name of the SQLite database file.When using this scraper, it is essential to adhere to GitHub's terms of service and respect the rights of repository owners. Follow these guidelines to ensure ethical use:
[visualizer.png]
Contributions are welcome! Please open an issue or submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
| Web Proxy Viewer | New URL | Original Page |