Open imochoa opened 4 years ago
import urllib.request import urllib.parse def get_latest_release_url(user_and_repo): url = f"https://github.com/{urllib.parse.quote(user_and_repo)}/releases/latest" with urllib.request.urlopen(url) as fp: # html = fp.read().decode('utf8') return fp.url print(get_latest_release_url('pdfminer/pdfminer.six'))