Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

ItsNiceCraft/licenses

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

import requests
from os import path, mkdir

if not path.exists("licenses"):
    mkdir("licenses")

res = requests.get("https://api.github.com/licenses")
if res.status_code != 200:
    print("Error receiving licenses")
    exit(1)
for gh_license in res.json():
    res_license = requests.get(gh_license["url"])
    if res_license.status_code != 200:
        print(f"Error receiving license {gh_license['key']}")
        exit(1)
    with open(f"licenses/{gh_license['key']}.txt", "w") as f:
        f.write(res_license.json()["body"])

About

⚖️ GitHub license data

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages