parent
10a734006b
commit
084bd51ac4
2
main.go
2
main.go
|
@ -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)
|
||||||
|
|
Reference in New Issue