def run(self):
install.run(self)
platform = self._get_platform()
library_full_path = self._get_install_full_path(
self._get_base_install_path(),
self._LIBRARY_NAME[platform][1])
get_latest_request = Request('https://github.com/yamachu/World/releases/latest',
headers={'Accept': 'application/json'})
get_latest_response = urlopen(get_latest_request)
response_str = get_latest_response.read().decode('utf-8')
response_json = json.loads(response_str)
latest_version = response_json['tag_name']
urlretrieve("{}/{}/{}".format(
self._DOWNLOAD_BASE_URL,
latest_version,
self._LIBRARY_NAME[platform][0]), library_full_path)
评论列表
文章目录