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
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()