OSINT_Tool / src /github_analysis.py python Copy Edit
Canstralian's picture
Create src/github_analysis.py python Copy Edit
5dc8748 verified
raw
history blame contribute delete
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}")