diff --git a/.github/.DS_Store b/.github/.DS_Store new file mode 100644 index 0000000000..5ab1ca51d9 Binary files /dev/null and b/.github/.DS_Store differ diff --git a/.github/getTrending.py b/.github/getTrending.py index 2229b94bb8..edc89cfa93 100644 --- a/.github/getTrending.py +++ b/.github/getTrending.py @@ -31,13 +31,13 @@ def time_ago(datetime_str): current_year = datetime.now().year total_repos_per_year = {} -tz_header = {"Time-Zone": "Europe/Amsterdam"} +#tz_header = {"Time-Zone": "Europe/Amsterdam"} repositories_by_year = {} for year in range(current_year, current_year - 5, -1): year_repositories = [] print(f"Fetching data for {year}") - response = requests.get(f'https://api.github.com/search/repositories?q=CVE-{year}%20in:name%20language:Shell%20language:Go%20language:ASP%20language:WebAssembly%20language:R%20language:Lua%20language:Python%20%20%20language:C++%20language:C%20language:JavaScript%20language:Perl%20language:PowerShell%20language:Ruby%20language:Rust%20language:Java%20%20language:PHP&s=updated&o=desc&page=1&per_page=100', headers=tz_header) + response = requests.get(f'https://api.github.com/search/repositories?q=CVE-{year}%20in:name%20%20stars:>2%20language:Shell%20language:Go%20language:ASP%20language:WebAssembly%20language:R%20language:Lua%20language:Python%20%20%20language:C++%20language:C%20language:JavaScript%20language:Perl%20language:PowerShell%20language:Ruby%20language:Rust%20language:Java%20%20language:PHP&s=updated&o=desc&page=1&per_page=20') if response.status_code != 200: print(f"Failed to fetch data for year {year}: {response.status_code}") continue @@ -55,7 +55,7 @@ for year in range(current_year, current_year - 5, -1): if year_repositories: # Sort the repositories by stargazers_count in descending order - year_repositories.sort(key=lambda repo: repo['stargazers_count'], reverse=True) + #year_repositories.sort(key=lambda repo: repo['stargazers_count'], reverse=True) repositories_by_year[year] = year_repositories # Define a class to handle repository information @@ -73,18 +73,18 @@ class RepositoryInfo: def __eq__(self, other): return self.html_url == other.html_url and self.name == other.name -final_output = ["# Trending Proof-of-Concept exploits"] +final_output = ['