lautarobock / alerta_sudestada

0 stars 0 forks source link

Obtencion de datos #5

Open lautarobock opened 7 months ago

lautarobock commented 7 months ago

https://www.hidro.gov.ar/oceanografia/alturashorarias.asp

Este parece ser publico, historico de alturas y proyeccion astronomica https://www.hidro.gov.ar/api/v1/AlturasHorarias/ValoresGrafico/SFER/202404150857?_=1713182226538

Ultimo Pronostico en formato HTML https://www.hidro.gov.ar/oceanografia/pronostico.asp

// get all tr elements from the table
document.querySelector('table').querySelectorAll('tr')

Scrap HTML https://itnext.io/write-your-first-web-scraper-in-dart-243c7bb4d05 https://clouddevs.com/dart/web-scraping/

Pronostico de mareas https://www.hidro.gov.ar/oceanografia/Tmareas/Form_Tmareas.asp (ver asp con la consulta)

POST https://www.hidro.gob.ar/oceanografia/Tmareas/RE_TablasDeMarea.asp
Form Data
FAnio=2024&Localidad=SANF&FMes=04&B1=
fetch("https://www.hidro.gob.ar/oceanografia/Tmareas/RE_TablasDeMarea.asp", {
  "headers": {
    "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
    "accept-language": "es-AR,es;q=0.9,es-419;q=0.8,en;q=0.7",
    "cache-control": "max-age=0",
    "content-type": "application/x-www-form-urlencoded",
    "sec-ch-ua": "\"Google Chrome\";v=\"123\", \"Not:A-Brand\";v=\"8\", \"Chromium\";v=\"123\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "iframe",
    "sec-fetch-mode": "navigate",
    "sec-fetch-site": "same-origin",
    "sec-fetch-user": "?1",
    "upgrade-insecure-requests": "1"
  },
  "referrer": "https://www.hidro.gob.ar/oceanografia/Tmareas/Form_Tmareas.asp",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "FAnio=2024&Localidad=SANF&FMes=04&B1=",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});