Skip to content

Commit

Permalink
Handle wget WARC-Target-URI formatting.
Browse files Browse the repository at this point in the history
- Resolves #514
- Regex replacement for getUrl
- Add test
- Add test fixture
  • Loading branch information
ruebot committed May 11, 2021
1 parent bfa7109 commit 2d6b2e0
Show file tree
Hide file tree
Showing 3 changed files with 636 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/scala/io/archivesunleashed/ArchiveRecord.scala
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ class ArchiveRecordImpl(r: SerializableWritable[ArchiveRecordWritable])
if (r.t.getFormat == ArchiveRecordWritable.ArchiveFormat.ARC) {
r.t.getRecord.asInstanceOf[ARCRecord].getMetaData.getUrl
} else {
r.t.getRecord.asInstanceOf[WARCRecord].getHeader.getUrl
r.t.getRecord
.asInstanceOf[WARCRecord]
.getHeader
.getUrl
.replaceAll("<|>", "")
}
}

Expand Down
Loading

0 comments on commit 2d6b2e0

Please sign in to comment.