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 78a145b9
authored
2023-10-02 19:29:03 -0300
by
Juan Pablo dure
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
inicio descarga de doc
1 parent
86441ff3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
data/fosa.json
fosadiaria.py
main.py
data/fosa.json
0 → 100644
View file @
78a145b
File mode changed
fosadiaria.py
View file @
78a145b
from
datetime
import
datetime
class
FosaDiaria
():
class
FosaDiaria
():
"""Esta clase almacenara todos los datos de finalizacion de
"""Esta clase almacenara todos los datos de finalizacion de
...
@@ -7,8 +7,12 @@ class FosaDiaria():
...
@@ -7,8 +7,12 @@ class FosaDiaria():
def
__init__
(
self
)
->
None
:
def
__init__
(
self
)
->
None
:
self
.
Cache
=
{}
self
.
Cache
=
{}
self
.
Archivo
=
"data/fosa.json"
def
BuscarDatosDominio
(
self
,
dominio
,
dia
,
selenium
):
def
BuscarDatosDominio
(
self
,
dominio
,
selenium
,
dia
=
False
):
if
dia
==
False
:
now
=
datetime
.
now
()
dia
=
now
.
strftime
(
"
%
d/
%
m/
%
Y"
)
try
:
try
:
data
=
self
[
dia
][
dominio
]
data
=
self
[
dia
][
dominio
]
except
:
except
:
...
@@ -23,7 +27,17 @@ class FosaDiaria():
...
@@ -23,7 +27,17 @@ class FosaDiaria():
return
(
data
)
return
(
data
)
def
ActualizarDatosDominios
(
self
,
selenium
):
def
ActualizarDatosDominios
(
self
,
selenium
):
pass
now
=
datetime
.
now
()
dia
=
now
.
strftime
(
"
%
d"
)
mes
=
now
.
strftime
(
"
%
m"
)
ano
=
now
.
strftime
(
"
%
Y"
)
self
.
LimpiarCarpertaDescarga
()
URL
=
f
"""https://rto.cent.gov.ar/rto/report/planillaDiariaEXCEL/planillaDiariaEXCEL?codTaller=54&fechaConsulta={dia}
%2
F{mes}
%2
F{ano}&agruparPorLinea=false&format=excel&extension=xls"""
selenium
.
get
(
URL
)
self
.
BajarExcel
()
def
BajarExcel
(
self
):
def
BajarExcel
(
self
):
pass
pass
def
LimpiarCarpertaDescarga
(
self
):
pass
main.py
View file @
78a145b
#-*- coding: utf-8 -*-
#-*- coding: utf-8 -*-
from
flask
import
Flask
,
render_template
,
request
,
url_for
,
make_response
,
redirect
from
flask
import
Flask
,
render_template
,
request
,
url_for
,
make_response
,
redirect
from
iselenium
import
SeleniumInterface
as
SI
from
iselenium
import
SeleniumInterface
as
SI
import
random
,
json
,
os
,
datetime
,
ingenieros
,
apollo
import
random
,
json
,
os
,
datetime
,
ingenieros
,
apollo
,
fosadiaria
ing
=
ingenieros
.
ingenieros
()
ing
=
ingenieros
.
ingenieros
()
FozaDiaria
=
fosadiaria
.
FosaDiaria
()
app
=
Flask
(
__name__
)
app
=
Flask
(
__name__
)
...
@@ -152,6 +153,7 @@ def report():
...
@@ -152,6 +153,7 @@ def report():
d
=
request
.
json
d
=
request
.
json
plate
=
d
[
'header'
][
'patente'
]
plate
=
d
[
'header'
][
'patente'
]
s
=
SI
(
SI
.
Chrome
)
s
=
SI
(
SI
.
Chrome
)
FozaDiaria
.
BuscarDatosDominio
(
plate
.
upper
(),
selenium
=
s
)
answer
=
{
answer
=
{
"header"
:
{},
"header"
:
{},
...
...
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