ccuetoh / libreapi Goto Github PK
View Code? Open in Web Editor NEWLa API gratuita de Chile
Home Page: https://www.libreapi.cl
License: MIT License
La API gratuita de Chile
Home Page: https://www.libreapi.cl
License: MIT License
Al parecer actualizaron la página del sii, por que ahora la api de actividades solo retorna una actividad y no una lista de actividades.
Como sea, yo lo reparé con esta porción de código en el método parseActivitiesHTML, un bucle for para iterar sobre cada tabla excluyendo la primera de matadata.
var activities []*Activity
for i := 0; i < 100; i++ {
doc.Find(fmt.Sprintf("table.tabla:nth-child(27) > tbody:nth-child(1) > tr:nth-child(%v)", i+2)).EachWithBreak(func(_ int, s *goquery.Selection) bool {
name2 := clean(s.Find("td:nth-child(1)"))
if name2 == "" {
return true
}
var code int
code, err = strconv.Atoi(clean(s.Find("td:nth-child(2)")))
if err != nil {
return false
}
var date time.Time
date, err = time.Parse(layout, clean(s.Find("td:nth-child(5)")))
if err != nil {
return false
}
activities = append(activities, &Activity{
Name: name2,
Code: code,
Category: clean(s.Find("td:nth-child(3)")),
SubjectToVAT: clean(s.Find("td:nth-child(4)")) == "Si",
Date: date,
})
return true
})
if err != nil {
return nil, err
}
}
When send a request using a RUT with format xx.xxx.xxx-x return duplicate json of type string.
example with dots: https://api.libreapi.cl/rut/activities?rut=17.758.605-6
example without dots: https://api.libreapi.cl/rut/activities?rut=17758605-6
hola amigos, buena colección de apis, muchas gracias por lo que hacen, una pregunta, ¿como puedo buscar otras cryptos que no estan enlistadas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.