Download src/github_analysis.py python Copy Edit from Chemically-motivated/OSINT_Tool: direct link, hf CLI and curl.
- Browser
- Download file 586 Bytes
-
https://huggingface.co/spaces/Chemically-motivated/OSINT_Tool/resolve/main/src/github_analysis.py%20python%20Copy%20Edit
- Command line
-
hf download 'hf://spaces/Chemically-motivated/OSINT_Tool/src/github_analysis.py python Copy Edit'
-
curl -L -o 'github_analysis.py python Copy Edit' https://huggingface.co/spaces/Chemically-motivated/OSINT_Tool/resolve/main/src/github_analysis.py%20python%20Copy%20Edit
586 Bytes
| import requests | |
| import logging | |
| def analyze_repository(owner, repo_name): | |
| try: | |
| url = f"https://api.github.com/repos/{owner}/{repo_name}" | |
| response = requests.get(url) | |
| response.raise_for_status() | |
| repo_data = response.json() | |
| logging.info(f"Analyzing repository: {repo_name}") | |
| logging.info(f"Description: {repo_data['description']}") | |
| logging.info(f"Stars: {repo_data['stargazers_count']}") | |
| except requests.exceptions.RequestException as e: | |
| logging.error(f"Failed to fetch data for {repo_name}: {e}") | |