diff --git a/brood/src/commands/ingest.rs b/brood/src/commands/ingest.rs index c4c82d5..8a9526d 100644 --- a/brood/src/commands/ingest.rs +++ b/brood/src/commands/ingest.rs @@ -79,12 +79,20 @@ fn first_stage() -> io::Result<(AdjacencyList, Titles)> { }, }); - for (to, start, end) in json_page.links { + if let Some(to) = json_page.redirect { let to = titles.insert(util::normalize_link(&to)); result.links.push(Link { to, - data: LinkInfo { start, end }, + data: LinkInfo { start: 0, end: 0 }, }); + } else { + for (to, start, end) in json_page.links { + let to = titles.insert(util::normalize_link(&to)); + result.links.push(Link { + to, + data: LinkInfo { start, end }, + }); + } } if (i + 1) % 100_000 == 0 {