|
@@ -68,6 +68,27 @@ class Parser extends CI_Controller
|
68
|
68
|
}
|
69
|
69
|
|
70
|
70
|
private function downloadProcess($urlXML)
|
|
71
|
+ {
|
|
72
|
+
|
|
73
|
+ $fileName = basename($urlXML);
|
|
74
|
+ $this->downloadFile($fileName, $urlXML, $this->rutaDiariaFecha);
|
|
75
|
+ $archivoAtom = $this->getFile($this->rutaDiariaFecha . $fileName, $fileName);
|
|
76
|
+ $nuevoAtomAttrNext = $this->readNextAttribute($archivoAtom);
|
|
77
|
+
|
|
78
|
+ while ($nuevoAtomAttrNext !== "") {
|
|
79
|
+ //$aux = 0;
|
|
80
|
+ //while ($aux <= 3) {
|
|
81
|
+
|
|
82
|
+ $fileName = basename($nuevoAtomAttrNext);
|
|
83
|
+ $this->downloadFile($fileName, $nuevoAtomAttrNext, $this->rutaDiariaFecha);
|
|
84
|
+ $archivoAtom = $this->getFile($this->rutaDiariaFecha . $fileName, $fileName);
|
|
85
|
+
|
|
86
|
+ $nuevoAtomAttrNext = $this->readNextAttribute($archivoAtom);
|
|
87
|
+ //$aux++;
|
|
88
|
+ }
|
|
89
|
+ }
|
|
90
|
+
|
|
91
|
+ private function downloadZip($urlXML)
|
71
|
92
|
{
|
72
|
93
|
$fileName = basename($urlXML);
|
73
|
94
|
$downladedZip = $this->downloadFile($fileName, $urlXML, $this->rutaDiariaFecha);
|
|
@@ -87,22 +108,6 @@ class Parser extends CI_Controller
|
87
|
108
|
}
|
88
|
109
|
|
89
|
110
|
}
|
90
|
|
- /*$fileName = basename($urlXML);
|
91
|
|
- $this->downloadFile($fileName, $urlXML, $this->rutaDiariaFecha);
|
92
|
|
- $archivoAtom = $this->getFile($this->rutaDiariaFecha . $fileName, $fileName);
|
93
|
|
- $nuevoAtomAttrNext = $this->readNextAttribute($archivoAtom);
|
94
|
|
-
|
95
|
|
- while ($nuevoAtomAttrNext !== "") {
|
96
|
|
- //$aux = 0;
|
97
|
|
- //while ($aux <= 3) {
|
98
|
|
-
|
99
|
|
- $fileName = basename($nuevoAtomAttrNext);
|
100
|
|
- $this->downloadFile($fileName, $nuevoAtomAttrNext, $this->rutaDiariaFecha);
|
101
|
|
- $archivoAtom = $this->getFile($this->rutaDiariaFecha . $fileName, $fileName);
|
102
|
|
-
|
103
|
|
- $nuevoAtomAttrNext = $this->readNextAttribute($archivoAtom);
|
104
|
|
- //$aux++;
|
105
|
|
- }*/
|
106
|
111
|
}
|
107
|
112
|
|
108
|
113
|
private function getFile($url, $fileName)
|
|
@@ -143,7 +148,7 @@ class Parser extends CI_Controller
|
143
|
148
|
$attrHref = $row['@attributes']['href'];
|
144
|
149
|
|
145
|
150
|
if ($attrNext === "next") {
|
146
|
|
- if (!strpos($attrHref, "20220209_180023")) { //"20220127_")) {
|
|
151
|
+ if (!strpos($attrHref, "licitacionesPerfilesContratanteCompleto3_2021")) { //"20220127_")) {
|
147
|
152
|
$enlace = $attrHref;
|
148
|
153
|
} else {
|
149
|
154
|
$enlace = "";
|