rootx Posted March 13, 2017 Share Posted March 13, 2017 (edited) I need to download and read last version of this program from github https://api.github.com/repos/rg3/youtube-dl/releases/latest I would extract from jsons "tag_name": "2017.03.10", #include <Array.au3> #include <Inet.au3> Example() Func Example() Local $dData = _INetGetSource('https://api.github.com/repos/rg3/youtube-dl/releases/latest') FileWriteLine(@ScriptDir&"\latest.json",$dData) EndFunc ;==>Example Edited March 14, 2017 by rootx Link to comment Share on other sites More sharing options...
Luigi Posted March 13, 2017 Share Posted March 13, 2017 (edited) Try this: #include-once #include <Inet.au3> #include <JSMN.au3> ; https://github.com/chechelaky/AutoIt/blob/master/JSMN.au3 #include <object_dump.au3> ; https://github.com/chechelaky/AutoIt/blob/master/object_dump.au3 Global $url = "https://api.github.com/repos/rg3/youtube-dl/releases/latest" Global $json = Jsmn_decode( _INetGetSource($url) ) If Not @error And $json.Exists("tag_name") Then MsgBox(0, "json", "tag_name = " & $json.Item("tag_name")) dump( $json ) EndIf Edited March 13, 2017 by Luigi rootx 1 Visit my repository Link to comment Share on other sites More sharing options...
rootx Posted March 14, 2017 Author Share Posted March 14, 2017 Great job, Thx 4share it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now