fix download data image fix #645 (#646)

This commit is contained in:
Monirzadeh 2023-07-15 21:34:14 +03:30 committed by GitHub
parent e02d3e7739
commit 78a7578f5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -245,7 +245,9 @@ func GetImages(html string) (map[string]string, error) {
// Loop through all the matches and add them to the dictionary
for _, match := range imageTagMatches {
imageURL := match[1]
images[imageURL] = match[0]
if !strings.HasPrefix(imageURL, "data:image/") {
images[imageURL] = match[0]
}
}
return images, nil