diff options
| author | Paul Buetow <paul@buetow.org> | 2024-11-07 09:06:53 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-11-07 09:06:53 +0200 |
| commit | 2a458a132244c36217acfd4fb718d9250ff1e4d7 (patch) | |
| tree | 8639e0258825430c0942533e3897b4496aec32cf /internal | |
| parent | d33184366a7960eba613b1e962fdcdba593795cd (diff) | |
fix no image found
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/platforms/linkedin/preview.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/platforms/linkedin/preview.go b/internal/platforms/linkedin/preview.go index b2a180a..6d1dd32 100644 --- a/internal/platforms/linkedin/preview.go +++ b/internal/platforms/linkedin/preview.go @@ -30,6 +30,10 @@ func NewPreview(ctx context.Context, urls []string) (preview, error) { log.Println("Setting title to", urls[0]) title = urls[0] } + if errors.Is(err, errNoImageElementFound) { + log.Println("URL", urls[0], "without any image, that's fine, though.") + err = nil + } return preview{title: title, imageURL: imageURL, url: urls[0]}, err } |
