java - jsoup how to reach dropdownlist -


Hello everyone I want to get data from this address can get them using jsoup but only the latest results website But there is a dropdown list that contains dates, how can I access other dates? By the way, I will transfer these codes to Android. These are the codes that are written in Netbeans. I will put a dropdown list in my Android program that receives data from this address and its results too.

These are my java code that I have written so far

  public static zero main (string [] args) {string address = "http: //sansoyunlari.hurriyet .com.tr / SayisalLoto / SayisalLotoSonuclari.aspx "; ArrayList sayi = New Arrestist & lt; & Gt; (); Sayi.add ("six"); Sayi.add ("five"); Sayi.add ("four"); Sayi.add ("three"); Sayi.add ("two"); Sayi.add ("a"); // Try the biking lotto {document doc = jsu oup. Connect (address) .get (); Elements Sonocler = doc.select ("div.hurriyet2010_so_sanstopu_no_bg"); // 1 People like Yee Manuel Blozbob Gerek have been asked to read the sonuclar1 = doc.select ("Duration # _ctl0_ContentPlaceHolder1_lblresut" + sayi.get (sayi.size () - 1)); Element numeric = sonocular 1 First (); Println (numaralar.text ()); // Broker 1 numaraları for the blogob için (int i = sonuclar.size (); i & gt; 1; i--) {sonuclar1 = doc.select ("duration # _ctl0_ContentPlaceHolder1_lblresult" + sayi.get (i-2) ); Element number 1 = sonucler 1 First (); Println (numaralar1.text ()); } // for Yule 2 Unicellial Eiskin // (Element L: Sonkler) // {// System.out.println (el.text ()); //} // have a different type of intersection (int i = 0; i <4; i ++) {int b = 6 -i; System.out.println (B + "Billine Keyishi says:"); Sonuclar = doc.select ("span # _ctl0_ContentPlaceHolder1_lblluckycount" + sayi.get (i)); Element L = Soklar.fst (); Println (el.text ()); System.out.println ("Dissoline Duessen Ikrami:"); Sonucular = doc.select ("span # _ctl0_ContentPlaceHolder1_lblluckyamount" + sayi.get (i)); L = sonkler.fst (); Println (el.text ()); }} Hold (exception e) {}}  

You should get the select item Do:

  Select element = doc.select ("#_ ctl0_ContentPlaceHolder1_ddlSayisalLotoDates"). first ();  

Now the children of this element have "Options" items that you want:

 for  (Element E: Select) {String Date = E.text (); }  

edit

I saw the HTML source To get the right page, you need to make a POST request to the URL with the following parameters:

  • __ Awhentargment = free
  • __EVENTTARGET = _ ctl0 $ ContentPlaceHolder1 $ ddlSayisalLotoDates
  • __ EVENTVALIDATION = is a random value that you get the html page
  • __ LASTFOCUS = free
  • __ ViewState = a random value
  • _ctl0: ContentPlaceHolder1: ddlSayisalLotoDates = id date you << Strong> 884 1 9th 2013 )
  • txtSearch = can be empty

As you can see, it is quite disturbing Aspiknet webpage ..


Comments