<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Corey – <o:p></o:p></p>
<p class="MsoNormal">Do you have access to query the database, as a starting point, instead of EAD?  We were able to pull the file_uri values from the file_version table in the database.  Our sysadmin then checked the response codes for that list of URI, and
 we referred issues out to staff working on those collections.  Some corrections can be made directly by staff, or for long lists, you could include the digital_object id and post updates that way.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Nancy<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org>
<b>On Behalf Of </b>Corey Schmidt<br>
<b>Sent:</b> Wednesday, February 10, 2021 8:45 AM<br>
<b>To:</b> archivesspace_users_group@lyralists.lyrasis.org<br>
<b>Subject:</b> [Archivesspace_Users_Group] Checking for Broken URLs in Resources<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:12.0pt;background:#FFEB9C">
<b><span style="font-size:9.0pt;color:#9C6500">External Email - Exercise Caution</span></b><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Dear all,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><br>
Hello, this is Corey Schmidt, ArchivesSpace PM at the University of Georgia. I hope everyone is doing well and staying safe and healthy.<br>
<br>
Would anyone know of any script, plugin, or tool to check for invalid URLs within resources? We are investigating how to grab URLs from exported EAD.xml files and check them to determine if they throw back any sort of error (404s mostly, but also any others).
 My thinking is to build a small app that will export EAD.xml files from ArchivesSpace, then sift through the raw xml using python's lxml package to catch any URLs using regex. After capturing the URL, it would then use the requests library to check the status
 code of the URL and if it returns an error, log that error in a .CSV output file to act as a "report" of all the broken links within that resource.<br>
<br>
The problems with this method are: 1. Exporting 1000s of resources takes a lot of time and some processing power, as well as a moderate amount of local storage space. 2. Even checking the raw xml file takes a considerable amount of time. The app I'm working
 on takes overnight to export and check all the xml files. I was considering pinging the API for different parts of a resource, but I figured that would take as much time as just exporting an EAD.xml and would be even more complex to write. I've checked Awesome
 ArchivesSpace, this listserv, and a few script libraries from institutions, but haven't found exactly what I am looking for.<br>
<br>
Any info or advice would be greatly appreciated! Thanks!<br>
<br>
Sincerely,<br>
<br>
Corey<o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div id="Signature">
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Verdana",sans-serif;color:black">Corey Schmidt</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Verdana",sans-serif;color:#333333">ArchivesSpace Project Manager</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Verdana",sans-serif;color:#333333">University of Georgia Special Collections Libraries</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><i><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#666666">Email:</span></i><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#666666">
<a href="mailto:Corey.Schmidt@uga.edu">Corey.Schmidt@uga.edu</a></span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>