Corrects some path
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user