Fix Imgur bug

https://redd.it/ti6wi5
This commit is contained in:
blank X 2022-03-21 11:06:56 +07:00
parent 10a734006b
commit 084bd51ac4
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ func main() {
if domain == "imgur.com" || strings.HasSuffix(domain, ".imgur.com") { if domain == "imgur.com" || strings.HasSuffix(domain, ".imgur.com") {
parsedUrl.Host = "i.imgur.com" parsedUrl.Host = "i.imgur.com"
if strings.HasPrefix(path, "/a/") || strings.HasPrefix(path, "/gallery/") { if strings.HasPrefix(path, "/a/") || strings.HasPrefix(path, "/gallery/") {
albumId := strings.SplitN(path, "/", 4)[2] albumId := strings.SplitN(strings.SplitN(path, "/", 4)[2], ".", 2)[0]
imgurImages, err := GetImgurAlbum(client, albumId) imgurImages, err := GetImgurAlbum(client, albumId)
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Failed to get imgur album: %s\n", err) fmt.Fprintf(os.Stderr, "Failed to get imgur album: %s\n", err)