From d901943758f200942a57a1dc163c73f502d2872c Mon Sep 17 00:00:00 2001 From: Alexandre Tuleu Date: Sat, 23 Sep 2017 16:45:48 +0200 Subject: [PATCH] Corrects some path --- album_description_getter.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/album_description_getter.go b/album_description_getter.go index 0f6d649..aca3221 100644 --- a/album_description_getter.go +++ b/album_description_getter.go @@ -29,11 +29,11 @@ func linkFromSelection(s *goquery.Selection) Link { // Get fetches data from www.bedetheque.com and parses it to a func (g *AlbumDescriptionGetter) Get(a *Album) error { 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 { return err } - defer closeOrPanic(resp.Body, "GET:http://"+URL) + defer closeOrPanic(resp.Body, "GET:https://"+URL) doc, err := goquery.NewDocumentFromReader(resp.Body) if err != nil { @@ -172,9 +172,11 @@ func (g *AlbumDescriptionGetter) Get(a *Album) error { } 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, - strings.Join(append([]string{""}, errorList...), "\n * ")) + strings.Join(append([]string{""}, errorList...), "\n * "), + resp.Body) + } a.FetchDate = time.Now()