Skip to content
Snippets Groups Projects
Commit 665f7ba1 authored by ale's avatar ale
Browse files

Skip data: URLs

parent 4cd67e72
No related branches found
No related tags found
No related merge requests found
......@@ -71,6 +71,10 @@ func GetLinks(resp *http.Response) ([]crawl.Outlink, error) {
var result []crawl.Outlink
links := make(map[string]crawl.Outlink)
for _, l := range outlinks {
// Skip data: URLs altogether.
if strings.HasPrefix(l.URL, "data:") {
continue
}
if linkurl, err := resp.Request.URL.Parse(l.URL); err == nil {
links[linkurl.String()] = crawl.Outlink{
URL: linkurl,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment