Print

Print


This may not be what you need, but I had a similar issue and wound up using pythonanywhere's gist console creator: https://www.pythonanywhere.com/gists/. You can put your script into a gist in github and the console will run it automatically when someone starts it up.

In my case, it was a simple script I created to automate formatting URLs for the library, and the person I made it for was comfortable entering the information into a console but didn't run python on their computer, so it was a good solution.

Lena

Lena Bohman
Data and Research Impact Librarian
Long Island Jewish - Forest Hills Liaison
Donald and Barbara Zucker School of Medicine at Hofstra/Northwell
[cid:663d7980-8d65-45c6-b3fc-19b75e7a9f76]
________________________________
From: Code for Libraries <[log in to unmask]> on behalf of Eric Lease Morgan <[log in to unmask]>
Sent: Thursday, December 15, 2022 9:26 AM
To: [log in to unmask] <[log in to unmask]>
Subject: [CODE4LIB] batch download

EXTERNAL MESSAGE

How can I use the Firefox, Chrome, and/or Safari Web browsers to batch download the content found at the other end of a list of URLs?

Suppose I have a list of URLs, for example:

  https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdistantreader.org%2Fstacks%2Fjournals%2Fcrl%2Fcrl-11730.pdf&amp;data=05%7C01%7Clena.g.bohman%40HOFSTRA.EDU%7C85268d1844264f4a7f4508dadea88313%7Ce32fc43d7c6246d9b49fcd53ba8d9424%7C0%7C0%7C638067113270487216%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=Z6liWtZ3gVZJyj8FPcoQIGcF%2FOTmkBr7anjiFFZ74A8%3D&amp;reserved=0
  https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdistantreader.org%2Fstacks%2Fjournals%2Fital%2Fital-5777.pdf&amp;data=05%7C01%7Clena.g.bohman%40HOFSTRA.EDU%7C85268d1844264f4a7f4508dadea88313%7Ce32fc43d7c6246d9b49fcd53ba8d9424%7C0%7C0%7C638067113270643442%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=0DLStmajt55EIHoVkj8A2V8k7b86ZNBtErrLQnQt4ho%3D&amp;reserved=0
  https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdistantreader.org%2Fstacks%2Fjournals%2Fital%2Fital-5582.pdf&amp;data=05%7C01%7Clena.g.bohman%40HOFSTRA.EDU%7C85268d1844264f4a7f4508dadea88313%7Ce32fc43d7c6246d9b49fcd53ba8d9424%7C0%7C0%7C638067113270643442%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=g38goI%2BUQ7YvrUWy7sGFPkt6Lctw0Gk%2FQXVDslSxaWk%3D&amp;reserved=0
  https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdistantreader.org%2Fstacks%2Fjournals%2Fital%2Fital-4657.pdf&amp;data=05%7C01%7Clena.g.bohman%40HOFSTRA.EDU%7C85268d1844264f4a7f4508dadea88313%7Ce32fc43d7c6246d9b49fcd53ba8d9424%7C0%7C0%7C638067113270643442%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=LhqCewWt%2BXSZl5oBzEeAZlmmaSxx8pw4ik9MFufvmyM%3D&amp;reserved=0
  https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdistantreader.org%2Fstacks%2Fjournals%2Fcrl%2Fcrl-9927.pdf&amp;data=05%7C01%7Clena.g.bohman%40HOFSTRA.EDU%7C85268d1844264f4a7f4508dadea88313%7Ce32fc43d7c6246d9b49fcd53ba8d9424%7C0%7C0%7C638067113270643442%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=mhERiN%2BIPTCX2x1lqyJhiBkBnYN2xU0jpW4UpQzMsug%3D&amp;reserved=0
  https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdistantreader.org%2Fstacks%2Fjournals%2Fcrl%2Fcrl-11945.pdf&amp;data=05%7C01%7Clena.g.bohman%40HOFSTRA.EDU%7C85268d1844264f4a7f4508dadea88313%7Ce32fc43d7c6246d9b49fcd53ba8d9424%7C0%7C0%7C638067113270643442%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=KBcCpizT%2FnAnXU4VpjQgyA8%2FeGOK%2B747usXhn40rdQ8%3D&amp;reserved=0
  https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdistantreader.org%2Fstacks%2Fjournals%2Fcrl%2Fcrl-12423.pdf&amp;data=05%7C01%7Clena.g.bohman%40HOFSTRA.EDU%7C85268d1844264f4a7f4508dadea88313%7Ce32fc43d7c6246d9b49fcd53ba8d9424%7C0%7C0%7C638067113270643442%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=Gp9mU6m4dwFOOB9mbrxZYaly%2BxFlHp2IiAmPCdV4ynI%3D&amp;reserved=0

Suppose also the list is saved as a file, or in my computer's clipboard.

Is there someway I can get the Web browser(s) to download all of the files? From the command-line I can do this work in many ways and with one hand tied behind my back, but most people do not / will not use the command line. Thus I need a way to use the GUI interface of a Web browser to do the work. Got any ideas?

Incidentally, all the URLs, above, point to articles written by Fred Kilgour (the founder of OCLC). A more complete list can be garnered with the following URL:

  https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdistantreader.org%2Fstacks%2Findexes%2Fsearch%3Findex%3Djournals%26query%3Dauthor%253Akilgour%26format%3Dhtml&amp;data=05%7C01%7Clena.g.bohman%40HOFSTRA.EDU%7C85268d1844264f4a7f4508dadea88313%7Ce32fc43d7c6246d9b49fcd53ba8d9424%7C0%7C0%7C638067113270643442%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=YiEIMmhDhOAvmgIEZOegoETRcWzSPJHjLA79PTrP8ug%3D&amp;reserved=0

--
Eric Lease Morgan
Navari Family Center for Digital Scholarship
Hesburgh Libraries
University of Notre Dame

574/631-8604
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcds.library.nd.edu%2F&amp;data=05%7C01%7Clena.g.bohman%40HOFSTRA.EDU%7C85268d1844264f4a7f4508dadea88313%7Ce32fc43d7c6246d9b49fcd53ba8d9424%7C0%7C0%7C638067113270643442%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=gDgGJ9%2Bkn%2F3WmtX0Kw%2B%2Bscw3MgfJ9kK3BzAepj2vcrY%3D&amp;reserved=0
**** CAUTION: This email originated from outside of Hofstra University. Do not click links or open attachments unless you recognize the sender and know the content is safe. ****