badoux / goscraper

Golang pkg to quickly return a preview of a webpage (title/description/images)
MIT License
108 stars 38 forks source link

Some URLs result in 'unsupported protocol scheme' #3

Closed rogierlommers closed 7 years ago

rogierlommers commented 7 years ago
package main

import (
    "fmt"
    "log"

    "github.com/badoux/goscraper"
)

func main() {
    s, err := goscraper.Scrape("https://docs.docker.com/engine/admin/host_integration/#examples", 5)
    if err != nil {
        log.Fatal(err)
    }

    fmt.Printf("Title : %s\n", s.Preview.Title)

}

Gives me the following:

Get /engine/admin/host_integration/: unsupported protocol scheme ""

badoux commented 7 years ago

Hi.

Thanks for the report. This bug should be fixed in the latest commit. (https://github.com/badoux/goscraper/commit/0213ced7087832e81e8892e8d044150cfc153856)

Let me know if it's ok.

rogierlommers commented 7 years ago

Thanks; just checked and worked out fine!