Corrects some path

This commit is contained in:
2017-09-23 16:45:48 +02:00
parent 91765d2c84
commit d901943758

View File

@@ -29,11 +29,11 @@ func linkFromSelection(s *goquery.Selection) Link {
// Get fetches data from www.bedetheque.com and parses it to a // Get fetches data from www.bedetheque.com and parses it to a
func (g *AlbumDescriptionGetter) Get(a *Album) error { func (g *AlbumDescriptionGetter) Get(a *Album) error {
URL := path.Join("www.bedetheque.com", fmt.Sprintf("BD--%d.html", a.ID)) URL := path.Join("www.bedetheque.com", fmt.Sprintf("BD--%d.html", a.ID))
resp, err := g.getter.Get("http://" + URL) resp, err := g.getter.Get("https://" + URL)
if err != nil { if err != nil {
return err return err
} }
defer closeOrPanic(resp.Body, "GET:http://"+URL) defer closeOrPanic(resp.Body, "GET:https://"+URL)
doc, err := goquery.NewDocumentFromReader(resp.Body) doc, err := goquery.NewDocumentFromReader(resp.Body)
if err != nil { if err != nil {
@@ -172,9 +172,11 @@ func (g *AlbumDescriptionGetter) Get(a *Album) error {
} }
if len(errorList) != 0 { if len(errorList) != 0 {
return fmt.Errorf("Could not parse description from http://%s:%s", return fmt.Errorf("Could not parse description from https://%s:%s\n%s",
URL, URL,
strings.Join(append([]string{""}, errorList...), "\n * ")) strings.Join(append([]string{""}, errorList...), "\n * "),
resp.Body)
} }
a.FetchDate = time.Now() a.FetchDate = time.Now()