diff --git a/az/parser.js b/az/parser.js index 111925db..efc55d3c 100755 --- a/az/parser.js +++ b/az/parser.js @@ -18,7 +18,7 @@ module.exports = new Parser(function analyseEC(parsedUrl, ec) { // use console.error for debuging // console.error(parsedUrl); - + let marginal; //let match; if (/^\/maf\/app\/delivery\/document$/i.test(path)) { @@ -28,7 +28,7 @@ module.exports = new Parser(function analyseEC(parsedUrl, ec) { result.db_id = param._; result.unitid = param.docguid; - } else if (/^\/maf\/app\/document$/i.test(path)) { + } else if (/^\/maf\/app\/document$/i.test(path) && parsedUrl.hostname == 'aranzadi.aranzadidigital.es') { if (param.marginal) { // http://aranzadi.aranzadidigital.es/maf/app/document?startChunk=1&endChunk=2&stid=marginal_chunk&ds=ARZ_LEGIS_CS&infotype=arz_legis&marginal=RCL\2004\1466&version=&srguid=i0ad6adc60000018b4985c8a0c99bd9dd&lang=spa&src=withinResuts&spos=1&epos=1&mdfilter=mdlegisfilter // http://aranzadi.aranzadidigital.es/maf/app/document?startChunk=1&endChunk=2&stid=marginal_chunk&ds=ARZ_LEGIS_CS&infotype=arz_legis&marginal=RCL\1979\2289&version=&srguid=i0ad6adc60000018b4985c8a0c99bd9dd&lang=spa&src=withinResuts&spos=10&epos=10&mdfilter=mdlegisfilter @@ -52,7 +52,36 @@ module.exports = new Parser(function analyseEC(parsedUrl, ec) { // http://aranzadi.aranzadidigital.es/maf/app/search/run/multi result.rtype = 'SEARCH'; result.mime = 'HTML'; - } + } else if (/^\/maf\/app\/document$/i.test(path) && (marginal = param.marginal) != undefined) { + if (marginal.split('\\')[0] === 'RJ' || marginal.split('\\')[0] === 'RCL') { + // https://insignis.aranzadidigital.es/maf/app/document?startChunk=1&mdfilter=mdlegisfilter&endChunk=2&stid=marginal_chunk&ds=ARZ_LEGIS_CS&infotype=arz_legis&subResult=i0ad6adc60000018ed0247a839bee5891&docguid=I6b664a40e83811db8079010000000000&marginal=RCL\1999\710&spos=1&epos=1&version=19990406&displayName=&lang=spa + // https://insignis.aranzadidigital.es/maf/app/document?srguid=i0ad6adc50000018ed0247dc8eb6fe26f&marginal=RJ\2017\1890&docguid=I03fcd8903aa011e79de2010000000000&ds=ARZ_LEGIS_CS&infotype=arz_doc-admin;&spos=1&epos=1&td=0&predefinedRelationshipsType=documentRetrieval&global-result-list=global&fromTemplate=&suggestScreen=&&selectedNodeName=&selec_mod=false&displayName= + result.rtype = 'ARTICLE'; + result.mime = 'HTML'; + } + + if (marginal.split('\\')[0] === 'BIB') { + // https://insignis.aranzadidigital.es/maf/app/document?srguid=i0ad6adc50000018ed0247a19ba6a7861&marginal=BIB\2021\1098&docguid=I2e8fecd0a23611ebaf9ae70e1612b1e3&ds=ARZ_LEGIS_CS&infotype=arz_biblos;&spos=1&epos=1&td=0&predefinedRelationshipsType=documentRetrieval&fromTemplate=&suggestScreen=&&selectedNodeName=&selec_mod=false&displayName= + // https://insignis.aranzadidigital.es/maf/app/document?srguid=i0ad6adc50000018ed0247a19ba6a7861&marginal=BIB\2015\322&docguid=Idbdd5360a82c11e4b065010000000000&ds=ARZ_LEGIS_CS&infotype=arz_biblos;&spos=5&epos=5&td=0&predefinedRelationshipsType=documentRetrieval&fromTemplate=&suggestScreen=&&selectedNodeName=&selec_mod=false&displayName= + result.rtype = 'BOOK'; + result.mime = 'HTML'; + } + if (marginal.split('\\')[0] === 'FOR') { + // https://insignis.aranzadidigital.es/maf/app/document?srguid=i0ad6adc50000018ed0247c23d3a4bb99&marginal=FOR\2012\839&docguid=I0eb20050b1e111e1847d010000000000&ds=ARZ_LEGIS_CS&infotype=arz_formularios;&spos=1&epos=1&td=0&predefinedRelationshipsType=documentRetrieval&fromTemplate=&suggestScreen=&&selectedNodeName=&selec_mod=false&displayName= + // https://insignis.aranzadidigital.es/maf/app/document?srguid=i0ad6adc50000018ed0247c23d3a4bb99&marginal=FOR\2011\924&docguid=I55351570de7f11e0a788010000000000&ds=ARZ_LEGIS_CS&infotype=arz_formularios;&spos=8&epos=8&td=0&predefinedRelationshipsType=documentRetrieval&fromTemplate=&suggestScreen=&&selectedNodeName=&selec_mod=false&displayName= + result.rtype = 'FORMULES'; + result.mime = 'HTML'; + } + + if (marginal.split('\\')[0] === 'MIX') { + // https://insignis.aranzadidigital.es/maf/app/document?srguid=i0ad6adc50000018ed0247b3d15b13605&marginal=MIX\2023\211717&docguid=Id421ff501ef611eeba5fb46f48ac422d&ds=ARZ_LEGIS_CS&infotype=arz_cuadros;&spos=1&epos=1&td=0&predefinedRelationshipsType=documentRetrieval&fromTemplate=&suggestScreen=&&selectedNodeName=&selec_mod=false&displayName= + // https://insignis.aranzadidigital.es/maf/app/document?srguid=i0ad6adc50000018ed0247b3d15b13605&marginal=MIX\2004\583&docguid=I4aa5994075a211dba338010000000000&ds=ARZ_LEGIS_CS&infotype=arz_cuadros;&spos=2&epos=2&td=0&predefinedRelationshipsType=documentRetrieval&fromTemplate=&suggestScreen=&&selectedNodeName=&selec_mod=false&displayName=# + result.rtype = 'IMAGE'; + result.mime = 'PDF'; + } + + result.unitid = marginal; + } return result; }); diff --git a/az/test/AZ.2024-04-19.csv b/az/test/AZ.2024-04-19.csv new file mode 100644 index 00000000..2f07dee4 --- /dev/null +++ b/az/test/AZ.2024-04-19.csv @@ -0,0 +1,16 @@ +out-db_id;out-unitid;out-rtype;out-mime;in-url +;MIX\2004\583;IMAGE;PDF;"https://insignis.aranzadidigital.es/maf/app/document?srguid=i0ad6adc50000018ed0247b3d15b13605&marginal=MIX\2004\583&docguid=I4aa5994075a211dba338010000000000&ds=ARZ_LEGIS_CS&infotype=arz_cuadros;&spos=2&epos=2&td=0&predefinedRelationshipsType=documentRetrieval&fromTemplate=&suggestScreen=&&selectedNodeName=&selec_mod=false&displayName=#" +;MIX\2023\211717;IMAGE;PDF;"https://insignis.aranzadidigital.es/maf/app/document?srguid=i0ad6adc50000018ed0247b3d15b13605&marginal=MIX\2023\211717&docguid=Id421ff501ef611eeba5fb46f48ac422d&ds=ARZ_LEGIS_CS&infotype=arz_cuadros;&spos=1&epos=1&td=0&predefinedRelationshipsType=documentRetrieval&fromTemplate=&suggestScreen=&&selectedNodeName=&selec_mod=false&displayName=" +;FOR\2011\924;FORMULES;HTML;"https://insignis.aranzadidigital.es/maf/app/document?srguid=i0ad6adc50000018ed0247c23d3a4bb99&marginal=FOR\2011\924&docguid=I55351570de7f11e0a788010000000000&ds=ARZ_LEGIS_CS&infotype=arz_formularios;&spos=8&epos=8&td=0&predefinedRelationshipsType=documentRetrieval&fromTemplate=&suggestScreen=&&selectedNodeName=&selec_mod=false&displayName=" +;FOR\2012\839;FORMULES;HTML;"https://insignis.aranzadidigital.es/maf/app/document?srguid=i0ad6adc50000018ed0247c23d3a4bb99&marginal=FOR\2012\839&docguid=I0eb20050b1e111e1847d010000000000&ds=ARZ_LEGIS_CS&infotype=arz_formularios;&spos=1&epos=1&td=0&predefinedRelationshipsType=documentRetrieval&fromTemplate=&suggestScreen=&&selectedNodeName=&selec_mod=false&displayName=" +;BIB\2015\322;BOOK;HTML;"https://insignis.aranzadidigital.es/maf/app/document?srguid=i0ad6adc50000018ed0247a19ba6a7861&marginal=BIB\2015\322&docguid=Idbdd5360a82c11e4b065010000000000&ds=ARZ_LEGIS_CS&infotype=arz_biblos;&spos=5&epos=5&td=0&predefinedRelationshipsType=documentRetrieval&fromTemplate=&suggestScreen=&&selectedNodeName=&selec_mod=false&displayName=" +;BIB\2021\1098;BOOK;HTML;"https://insignis.aranzadidigital.es/maf/app/document?srguid=i0ad6adc50000018ed0247a19ba6a7861&marginal=BIB\2021\1098&docguid=I2e8fecd0a23611ebaf9ae70e1612b1e3&ds=ARZ_LEGIS_CS&infotype=arz_biblos;&spos=1&epos=1&td=0&predefinedRelationshipsType=documentRetrieval&fromTemplate=&suggestScreen=&&selectedNodeName=&selec_mod=false&displayName=" +;RJ\2017\1890;ARTICLE;HTML;"https://insignis.aranzadidigital.es/maf/app/document?srguid=i0ad6adc50000018ed0247dc8eb6fe26f&marginal=RJ\2017\1890&docguid=I03fcd8903aa011e79de2010000000000&ds=ARZ_LEGIS_CS&infotype=arz_doc-admin;&spos=1&epos=1&td=0&predefinedRelationshipsType=documentRetrieval&global-result-list=global&fromTemplate=&suggestScreen=&&selectedNodeName=&selec_mod=false&displayName=" +;RCL\1999\710;ARTICLE;HTML;https://insignis.aranzadidigital.es/maf/app/document?startChunk=1&mdfilter=mdlegisfilter&endChunk=2&stid=marginal_chunk&ds=ARZ_LEGIS_CS&infotype=arz_legis&subResult=i0ad6adc60000018ed0247a839bee5891&docguid=I6b664a40e83811db8079010000000000&marginal=RCL\1999\710&spos=1&epos=1&version=19990406&displayName=&lang=spa +;;SEARCH;HTML;https://insignis.aranzadidigital.es/maf/app/search/run/multi +;I0661f5f02b8a11e1936b010000000000;FORMULES;HTML;http://aranzadi.aranzadidigital.es/maf/app/document?docguid=I0661f5f02b8a11e1936b010000000000&srguid=i0ad6adc60000018b49ab472c81fff954&src=withinResuts&spos=4&epos=4 +;I0aabd1b05e2a11e8a041010000000000;FORMULES;HTML;http://aranzadi.aranzadidigital.es/maf/app/document?docguid=I0aabd1b05e2a11e8a041010000000000&srguid=i0ad6adc60000018b49ab472c81fff954&src=withinResuts&spos=1&epos=1 +1697747395452;I3407bf608eb111ea98abc16d771da8bc;ARTICLE;PDF;http://aranzadi.aranzadidigital.es/maf/app/delivery/document?_=1697747395452&deliveryTarget=save&deliveryType=document&infoType=arz_legis&typeTitle=Legislaci%C3%B3n&magazines=&srguid=i0ad6adc60000018b49a00a26fc754444&td=0&docTitle=Desarrolla+el+Estatuto+del+Trabajo+Aut%C3%B3nomo++(RCL+2007%5C1354)+en+materia+de+contrato+del+trabajador+aut%C3%B3n...&label=Real+Decreto+n%C3%BAm.+197%2F2009%2C+de+23+febrero&docguid=I3407bf608eb111ea98abc16d771da8bc +;RCL\1979\2289;ARTICLE;HTML;http://aranzadi.aranzadidigital.es/maf/app/document?startChunk=1&endChunk=2&stid=marginal_chunk&ds=ARZ_LEGIS_CS&infotype=arz_legis&marginal=RCL\1979\2289&version=&srguid=i0ad6adc60000018b4985c8a0c99bd9dd&lang=spa&src=withinResuts&spos=10&epos=10&mdfilter=mdlegisfilter +;RCL\2004\1466;ARTICLE;HTML;http://aranzadi.aranzadidigital.es/maf/app/document?startChunk=1&endChunk=2&stid=marginal_chunk&ds=ARZ_LEGIS_CS&infotype=arz_legis&marginal=RCL\2004\1466&version=&srguid=i0ad6adc60000018b4985c8a0c99bd9dd&lang=spa&src=withinResuts&spos=1&epos=1&mdfilter=mdlegisfilter +;;SEARCH;HTML;http://aranzadi.aranzadidigital.es/maf/app/search/run/multi \ No newline at end of file diff --git a/az/test/az.2023-11-01.csv b/az/test/az.2023-11-01.csv deleted file mode 100644 index 64132986..00000000 --- a/az/test/az.2023-11-01.csv +++ /dev/null @@ -1,9 +0,0 @@ -out-publication_date;out-title_id;out-db_id;out-unitid;out-rtype;out-mime;in-url -;;;;SEARCH;HTML;http://aranzadi.aranzadidigital.es/maf/app/search/run/multi -;;;RCL\2004\1466;ARTICLE;HTML;http://aranzadi.aranzadidigital.es/maf/app/document?startChunk=1&endChunk=2&stid=marginal_chunk&ds=ARZ_LEGIS_CS&infotype=arz_legis&marginal=RCL\2004\1466&version=&srguid=i0ad6adc60000018b4985c8a0c99bd9dd&lang=spa&src=withinResuts&spos=1&epos=1&mdfilter=mdlegisfilter -;;;RCL\1979\2289;ARTICLE;HTML;http://aranzadi.aranzadidigital.es/maf/app/document?startChunk=1&endChunk=2&stid=marginal_chunk&ds=ARZ_LEGIS_CS&infotype=arz_legis&marginal=RCL\1979\2289&version=&srguid=i0ad6adc60000018b4985c8a0c99bd9dd&lang=spa&src=withinResuts&spos=10&epos=10&mdfilter=mdlegisfilter -;;1697747395452;I3407bf608eb111ea98abc16d771da8bc;ARTICLE;PDF;http://aranzadi.aranzadidigital.es/maf/app/delivery/document?_=1697747395452&deliveryTarget=save&deliveryType=document&infoType=arz_legis&typeTitle=Legislaci%C3%B3n&magazines=&srguid=i0ad6adc60000018b49a00a26fc754444&td=0&docTitle=Desarrolla+el+Estatuto+del+Trabajo+Aut%C3%B3nomo++(RCL+2007%5C1354)+en+materia+de+contrato+del+trabajador+aut%C3%B3n...&label=Real+Decreto+n%C3%BAm.+197%2F2009%2C+de+23+febrero&docguid=I3407bf608eb111ea98abc16d771da8bc -;;;Revista Doctrinal Aranzadi Civil-Mercantil;TOC;HTML;http://aranzadi.aranzadidigital.es/maf/app/search/run?stid=magazines&ds=ARZ_BIBLOS_CS&publicacion=Revista%20Doctrinal%20Aranzadi%20Civil-Mercantil&fechacomun=20121231&displayid=actualidad.aranzadi.civil -;;;Revista de Derecho Patrimonial;TOC;HTML;http://aranzadi.aranzadidigital.es/maf/app/search/run?stid=magazines&ds=ARZ_BIBLOS_CS&publicacion=Revista%20de%20Derecho%20Patrimonial&fechacomun=20121231&displayid=actualidad.revista.derecho.patrimonial -;;;I0aabd1b05e2a11e8a041010000000000;FORMULES;HTML;http://aranzadi.aranzadidigital.es/maf/app/document?docguid=I0aabd1b05e2a11e8a041010000000000&srguid=i0ad6adc60000018b49ab472c81fff954&src=withinResuts&spos=1&epos=1 -;;;I0661f5f02b8a11e1936b010000000000;FORMULES;HTML;http://aranzadi.aranzadidigital.es/maf/app/document?docguid=I0661f5f02b8a11e1936b010000000000&srguid=i0ad6adc60000018b49ab472c81fff954&src=withinResuts&spos=4&epos=4 \ No newline at end of file