youtuber Posted July 2, 2016 Share Posted July 2, 2016 (edited) Hi, how can I get data jQuery #include <Array.au3> #include <String.au3> $Url = InetRead("http://www.millipiyango.gov.tr/sonuclar/_cs_sanstopu.php",0) $Url = BinaryToString($Url, 4) $receivedata = StringRegExp($Url, '(?i)sanstopu-hafta">(.*?)</span>', 3) MsgBox(0,"test", "Hafta:",$receivedata[0]) Edited July 3, 2016 by youtuber Link to comment Share on other sites More sharing options...
jguinch Posted July 2, 2016 Share Posted July 2, 2016 The good syntax for MsgBox should be MsgBox(0,"test", "Hafta:" & $receivedata[0]) youtuber 1 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
mikell Posted July 2, 2016 Share Posted July 2, 2016 The number to get is dynamically javascript generated depending on the date $date = "29/06/2016" $code = StringRegExpReplace($date, '(\d+)/(\d+)/(\d+)', "$3$2$1") $url = "http://www.millipiyango.gov.tr/sonuclar/cekilisler/sanstopu/" & $code & ".json" $data = BinaryToString(InetRead($url)) $receivedata = StringRegExp($data, 'hafta":(\d+)', 1) MsgBox(0,"test", "Hafta:" & $receivedata[0]) youtuber 1 Link to comment Share on other sites More sharing options...
youtuber Posted July 3, 2016 Author Share Posted July 3, 2016 http://www.millipiyango.gov.tr/sonuclar/cekilisler/sanstopu/20160629.json @mikell: From where did you get that url? Link to comment Share on other sites More sharing options...
mikell Posted July 3, 2016 Share Posted July 3, 2016 In the source code of the main page I saw this : function tarihSecildi (item) { var url = 'cekilisler/sanstopu/' + item.value + '.json'; <<<<<<<<<<<<<<<<<<<<<<<<<<<< jQuery.getJSON(url, function(json) { jQuery('#sanstopu-hafta').html(json.data.hafta); <<<<<<<<<<<<<<<<<<<<<<<<<<<< "item.value" = date, "cekilisler/sanstopu/+date+.json" = name of the json, "#sanstopu-hafta" = data to get youtuber 1 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