Files
linux-kernel-module-cheat/download-latest-release
Ciro Santilli 六四事件 法轮功 f40e584b95 release: make runnable again
Create download-latest-release helper
2018-09-16 07:51:22 +01:00

12 lines
393 B
Python
Executable File

#!/usr/bin/env python3
import json
import urllib.request
_json = json.loads(urllib.request.urlopen(urllib.request.Request(
'https://api.github.com/repos/cirosantilli/linux-kernel-module-cheat/releases',
headers={'Accept' : 'application/vnd.github.full+json"text/html'}
)).read())
asset = _json[0]['assets'][0]
urllib.request.urlretrieve(asset['browser_download_url'], asset['name'])