def support_in_progress_warcs():
    '''
    Monkey-patch pywb.warc.pathresolvers.PrefixResolver to include warcs still
    being written to (warcs having ".open" suffix). This way if a cdx entry
    references foo.warc.gz, pywb will try both foo.warc.gz and
    foo.warc.gz.open.
    '''
    _orig_prefix_resolver_call = pywb.warc.pathresolvers.PrefixResolver.__call__
    def _prefix_resolver_call(self, filename, cdx=None):
        raw_results = _orig_prefix_resolver_call(self, filename, cdx)
        results = []
        for warc_path in raw_results:
            results.append(warc_path)
            results.append('%s.open' % warc_path)
        return results
    pywb.warc.pathresolvers.PrefixResolver.__call__ = _prefix_resolver_call
def support_in_progress_warcs ( ) : _orig_prefix_resolver_call = pywb . warc . pathresolvers . PrefixResolver . __call__ def _prefix_resolver_call ( self , filename , cdx = None ) : raw_results = _orig_prefix_resolver_call ( self , filename , cdx ) results = [ ] for warc_path in raw_results : results . append ( warc_path ) results . append ( '%s.open' % warc_path ) return results pywb . warc . pathresolvers . PrefixResolver . __call__ = _prefix_resolver_call
Monkey-patch pywb.warc.pathresolvers.PrefixResolver to include warcs still
    being written to (warcs having ".open" suffix). This way if a cdx entry
    references foo.warc.gz, pywb will try both foo.warc.gz and
    foo.warc.gz.open.