@@ -0,0 +1,2545 @@
+/*%0A%0ACopyright (c) 2000-2022, Board of Trustees of Leland Stanford Jr. University%0A%0ARedistribution and use in source and binary forms, with or without%0Amodification, are permitted provided that the following conditions are met:%0A%0A1. Redistributions of source code must retain the above copyright notice,%0Athis list of conditions and the following disclaimer.%0A%0A2. Redistributions in binary form must reproduce the above copyright notice,%0Athis list of conditions and the following disclaimer in the documentation%0Aand/or other materials provided with the distribution.%0A%0A3. Neither the name of the copyright holder nor the names of its contributors%0Amay be used to endorse or promote products derived from this software without%0Aspecific prior written permission.%0A%0ATHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS %22AS IS%22%0AAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE%0AIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE%0AARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE%0ALIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR%0ACONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF%0ASUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS%0AINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN%0ACONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)%0AARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE%0APOSSIBILITY OF SUCH DAMAGE.%0A%0A*/%0A%0Apackage org.lockss.plugin.usdocspln.gov.govinfo;%0A%0Aimport java.io.InputStream;%0A%0Aimport org.htmlparser.NodeFilter;%0Aimport org.htmlparser.filters.OrFilter;%0Aimport org.lockss.daemon.PluginException;%0Aimport org.lockss.filter.html.*;%0Aimport org.lockss.plugin.*;%0A%0Apublic class GovInfoHtmlHashFilterFactory implements FilterFactory %7B%0A%0A  public InputStream createFilteredInputStream(ArchivalUnit au,%0A                                               InputStream in,%0A                                               String encoding)%0A      throws PluginException %7B%0A    NodeFilter%5B%5D filters = new NodeFilter%5B%5D %7B%0A        // Share by e-mail tag with a unique tracking identifier, e.g. %3Ca href=%22/cdn-cgi/l/email-protection#b788...858f%22 id=%22email-share-search%22 target=%22_blank%22%3E%0A        HtmlNodeFilters.tagWithAttribute(%22a%22, %22id%22, %22email-share-search%22),%0A    %7D;%0A    return new HtmlFilterInputStream(in,%0A                                     encoding,%0A                                     HtmlNodeFilterTransform.exclude(new OrFilter(filters)));%0A  %7D%0A  %0A%7D%0A

Tweak retry timing. Also retry non-fatal URLs.