Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
Pruebas-RTO
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 311d95fa
authored
2023-10-03 11:48:32 -0300
by
Juan Pablo dure
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
dwqdwq
1 parent
f1b3f69d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
fosadiaria.py
fosadiaria.py
View file @
311d95f
...
@@ -20,13 +20,13 @@ class FosaDiaria():
...
@@ -20,13 +20,13 @@ class FosaDiaria():
now
=
datetime
.
now
()
now
=
datetime
.
now
()
dia
=
now
.
strftime
(
"
%
d/
%
m/
%
Y"
)
dia
=
now
.
strftime
(
"
%
d/
%
m/
%
Y"
)
try
:
try
:
data
=
self
[
dia
][
dominio
]
data
=
self
.
Cache
[
dia
][
dominio
]
except
:
except
:
data
=
False
data
=
False
if
not
data
==
False
:
if
not
data
==
False
:
return
data
return
data
try
:
try
:
self
.
ActualizarDatosDominios
(
selenium
)
self
.
ActualizarDatosDominios
(
selenium
,
dia
)
except
Exception
as
E
:
except
Exception
as
E
:
print
(
f
"""Error al actualizar dominio {str(E)}"""
)
print
(
f
"""Error al actualizar dominio {str(E)}"""
)
...
@@ -35,12 +35,34 @@ class FosaDiaria():
...
@@ -35,12 +35,34 @@ class FosaDiaria():
def
LimpiarData
(
self
,
data
,
dominio
,
dia
):
def
LimpiarData
(
self
,
data
,
dominio
,
dia
):
return
(
data
)
return
(
data
)
def
ActualizarDatosDominios
(
self
,
selenium
):
def
ActualizarDatosDominios
(
self
,
selenium
,
dia
):
self
.
BajarExcel
(
selenium
)
self
.
BajarExcel
(
selenium
)
archivo
=
self
.
BuscarExcelDescargado
()
archivo
=
self
.
BuscarExcelDescargado
()
df
=
pd
.
read_excel
(
archivo
)
df
=
pd
.
read_excel
(
archivo
)
print
(
df
)
#print(df)
print
(
df
.
to_dict
())
#print(df.to_dict())
self
.
ProcesarDatos
(
df
,
dia
)
def
ProcesarDatos
(
self
,
df
,
dia
):
data
=
df
.
to_dict
()
for
n
in
len
(
data
[
"domino"
]):
dominio
=
data
[
"domino"
][
n
]
self
.
Cache
[
dia
][
dominio
]
=
{
"dominio"
:
dominio
,
"tipo"
:
data
[
"tipo"
][
n
],
"inicio"
:
data
[
"inicio"
][
n
],
"fin"
:
data
[
"fin"
][
n
],
"resultado"
:
data
[
"resultado"
][
n
],
"cuit"
:
data
[
"cuit"
][
n
],
"vence"
:
data
[
"vence"
][
n
],
"hora"
:
self
.
CorreccionDeHora
(
data
[
"fin"
][
n
])
}
n
=
n
+
1
#arranco desde 0
print
(
self
.
Cache
)
def
CorreccionDeHora
(
self
,
fin
):
"""Hora de finalizacion menos 10 minutos"""
return
(
fin
)
def
BajarExcel
(
self
,
selenium
):
def
BajarExcel
(
self
,
selenium
):
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment