diff options
| author | horus_arch | 2018-02-17 13:51:35 +0100 |
|---|---|---|
| committer | horus_arch | 2018-02-17 13:51:35 +0100 |
| commit | bcdea2f8e95f5305625a773223829478c8c13bed (patch) | |
| tree | efac40b03131b4f9e43de848920695ee785a0a3f /crawler/post_process.go | |
| parent | 9ebf51364773dae6db4c0c47d77710c9f1a37b51 (diff) | |
| download | alkobote-bcdea2f8e95f5305625a773223829478c8c13bed.tar.gz | |
Introduces context on errors. (crawler)
Diffstat (limited to 'crawler/post_process.go')
| -rw-r--r-- | crawler/post_process.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/crawler/post_process.go b/crawler/post_process.go index dfd7861..4688cc8 100644 --- a/crawler/post_process.go +++ b/crawler/post_process.go @@ -37,9 +37,8 @@ func (app *App) short_url() error { v.Add("url", offer_db.Url) polr_url := app.Config.Polr_URL + "?" + v.Encode() - if app.Config.Debug { - log.Debug("polr_url: " + polr_url + " ( " + offer_db.Url + " )") - } + log.Debug("polr_url: " + polr_url + " ( " + offer_db.Url + " )") + resp, err := http.Get(polr_url) if err != nil { return err @@ -52,9 +51,7 @@ func (app *App) short_url() error { } offer_db.Short_url = string(short_url) - if app.Config.Debug { - log.Debug("short_url: " + string(short_url) + " ( " + offer_db.Url + " )") - } + log.Debug("short_url: " + string(short_url) + " ( " + offer_db.Url + " )") Angebote = append(Angebote, offer_db) } |
