How To Get The Latest Release Version In Github Only Use Python-requests?
Recently,I make an app and upload it to my GitHub release page.I want to make a function to check update to get the latest version(in the release pages). I try to use requests modu
Solution 1:
A direct way is to use Github API,it is easy to do and don't need xpath.
The url should be:
https://api.github.com/repos/{owner}/{target_repos}/releases/latest
So if you want to get the latest release version of the repository.Here is an easy example only use requests
module:
import requests
response = requests.get("https://api.github.com/repos/v2ray/v2ray-core/releases/latest")
print(response.json()["name"])
Post a Comment for "How To Get The Latest Release Version In Github Only Use Python-requests?"