Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/09/2012, 04:49
Avatar de Eleazan
Eleazan
 
Fecha de Ingreso: abril-2008
Ubicación: Ibiza
Mensajes: 1.879
Antigüedad: 16 años, 1 mes
Puntos: 326
Respuesta: API sacar los resultados de loterias y apuestas

Bueno, es relativamente sencillo...

Solo debes fijarte, por ejemplo, en la opcion de "Exportar", que tiene un link de este estilo:

http://www.loteriasyapuestas.es/inde...rteo.810409071

Este es para LNAC (Loteria Nacional)... supongo que más o menos, todos seran del estilo! ;)

Edit:

Algo mejor:
Código Javascript:
Ver original
  1. function buscarPagina(
  2.         filtro_tipo,
  3.         filtro_cf,
  4.         gameid,
  5. //      nextweek,
  6. //      lastweek,
  7.         fecha_ini,
  8.         fecha_fin,
  9.         temporada,
  10.         filtro_dia,
  11.         pagina) {
  12.        
  13.         //SorteoListadosDatos.panelSorteo.fadeOut(10, "linear", function() {
  14.             SorteoListadosDatos.panelSorteo.html( '<div class="cargando"></div>'  );
  15.         //  SorteoListadosDatos.panelSorteo.fadeIn(10, "linear");
  16.         //});
  17.        
  18.         var url = '/index.php/mod.sorteos/mem.buscarListadoSorteos';
  19.  
  20.         if( filtro_tipo )  url+='/filtro_tipo.'+filtro_tipo;       
  21.         if( filtro_cf )  url+='/filtro_cf.'+filtro_cf;
  22.         if( gameid ) url+='/juego.'+gameid;
  23.         if( fecha_ini ) url+='/fecha_ini.'+fecha_ini;
  24.         if( fecha_fin ) url+='/fecha_fin.'+fecha_fin;
  25.         if( temporada ) url+='/temporada.'+temporada;
  26.         if( filtro_dia ) url+='/filtro_dia.'+filtro_dia;
  27.         if( pagina ) url+='/pagina.'+pagina;
  28.        
  29.        
  30.         /*var cache = inicializarCache(1);*/
  31.         $.get(url, null, function(data){
  32.        
  33.                 if( data ) {
  34.                     //cache['html']   = data;
  35.                     updateHtml(data);
  36.                     //SorteoListadosDatos.fecha = fecha;
  37.                 }
  38.             });
  39.     };

Fíjate en esta función. Con estos filtros y esta url, puedes obtener el juego que quieras (gameid) aplicandole los filtros que quieras!
__________________
>> Eleazan's Source
>> @Eleazan

Última edición por Eleazan; 10/09/2012 a las 04:57