Extraiga archivos ZIP del enlace HTTPHe publicado archivos ZIP y quiero extraerlos mediante programación y almacenarlos en mi PC mediante JSL. No sé de antemano cuántos archivos estarán presentes.
¿Es esto posible con JSL?

Re: Extraer archivos ZIP desde un enlace HTTP¡Me alegro que puedas sacar algo de esto! Estoy bastante seguro de que el patrón podría mejorarse en cuanto a velocidad. Probablemente no haga una diferencia para directorios de solo unos pocos miles de enlaces, pero la parte len(1) podría omitir el texto que no es un enlace más rápido. Y también sería mejor un patrón más flexible para los enlaces.
@bryan_boone @ErnestPasour @paul_vezzetti
Re: Extraer archivos ZIP desde un enlace HTTPGracias Craig por la respuesta completa. Tomaré elementos de ambas sugerencias y los fusionaré en una función genérica para satisfacer mis necesidades actuales y futuras.
Sé que tendría que usar REGEXP para encontrar los enlaces de la fuente HTTP, pero esperaba una función '<< saveLink' para la parte zip. 
Sin embargo, esto funcionará perfectamente bien.
Excelentes respuestas
Re: Extraer archivos ZIP desde un enlace HTTPO tal vez esto se acerque más a lo que estás preguntando:
path="https://www.vsp.virginia.gov/downloads/"; // a page with an index of files. Yours may be different format, adjust pattern below.
html = loadtextfile(path); // get the HTML text so we can scrape the links
// somewhat custom pattern for scraping the links, may be specific to this page
urls = {}; // this list will collect the urls
rc = patmatch(html,
patpos(0)+ // make sure the pattern matches from the start
patrepeat( // this is the loop that extracts the urls from the html
(
// the urls look like <A href="https://community.jmp.com/2017%20Virginia%20Firearms%20Dealers%20Procedrures%20Manual.pdf" target="_blank" rel="nofollow noopener noreferrer">// y queremos solo la parte entre comillas. Escanee rápidamente hacia adelante (patBreak) // en busca de un < y luego vea si coincide. >>url toma el texto entre comillas. (patbreak("<") + "</A><A href="\!" target="_blank" rel="nofollow noopener noreferrer">> url + pattest(insertar(urls,url);1)) | // O patlen(1) // salta un carácter hacia adelante ) + patfence() // delimita el texto coincidente exitosamente. No es necesario retroceder si algo sale mal. ) + patrepeat(patnotany("<"),0) + // aquí se consumen todos los bits finales de html patrpos(0) // asegúrese de que el patrón coincida hasta el final); if(rc==0, throw("el patrón no coincide con todo")); mostrar(nitems(urls),urls[6]); // elige el elemento 6. Tendrás una estrategia diferente. fullpath = path||regex(urls[6],"%20"," ",GLOBALREPLACE);// mínimo esfuerzo para arreglar la URL, puede que necesite más trabajo pdfblob = loadtextfile(fullpath,blob); // descarga el elemento 6, era un pdf cuando se escribió esto... savetextfile("$temp/example.pdf",pdfblob); // guárdalo en algún lugar</A>Re: Extraer archivos ZIP desde un enlace HTTP
archivo zip de la presentación de @wilkap
</CODE></DIR></PRE><P><CODE class=" language-jsl">several things to notethe file is downloaded to your temp directory; the "zip" option to open returns a zip archive objectyou can get a list of members from the zip archive using << i>you can use the blob format with zip archive for reading binary data like JMP tablesthe 3rd line uses a 2nd argument to tell open that the blob is a JMP data tableclearing the za variable is needed if you rerun the whole script; the zip archive object keeps the file in the temp directory from being reused.you could use loadtextfile/savetextfile with blobs to download the zip file to a location of your choice (and delete it when done) and then use the zip archive to process that file.I already looked to see the 4th item in the archive directory was a JMP data table za=open("https://community.jmp.com/kvoqx44227/attachments/kvoqx44227/virtual-jug/12/1/VJUG%20July%202015.zip","zip");
zipfiles=za<