Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/basedrhys/github-scraper
Python package to download GitHub source code for specific file types easily
https://github.com/basedrhys/github-scraper
Last synced: 23 days ago
JSON representation
Python package to download GitHub source code for specific file types easily
- Host: GitHub
- URL: https://github.com/basedrhys/github-scraper
- Owner: basedrhys
- License: mit
- Created: 2019-09-05T00:26:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-05T10:25:26.000Z (over 5 years ago)
- Last Synced: 2024-12-10T07:57:11.946Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-scraper
Simple python package designed for easy downloading of source code from Github Users.Terms:
- **Owner** is used to describe a repository owner/user that created the repository. Owner is GitHubs term so it's used here for consistency## Installation
python3 -m pip install github_scraper## Usage
Import and set up the config with username and API token>>> import github_scraper as gs
>>> config = gs.Config('MY_USERNAME', 'MY_API_KEY')It defaults to downloading Java files, but can be configured for other languages
>>> config = gs.Config('MY_USERNAME', 'MY_API_KEY', repo_language='Python', query_language='python', suffix='.py')
Downloading all Java files from myself
>>> scraper = gs.FileScraper(config)
>>> scraper.download_owner('basedrhys')
Scraping owner: basedrhys
...Downloading all Java files from a specific repo
>>> owner = gs.Owner('google', config)
>>> owner.download_repo('tink')