Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Deviantart] Gallery-dl only downloads single image from post with multiple images #6653

Open
defaultd3f4lt opened this issue Dec 11, 2024 · 23 comments

Comments

@defaultd3f4lt
Copy link

Now that my previous issue is resolved i can suggest update for deviantart scrapper.

Recently Deviantart implements a new feature that allowing users to upload up to 10 images in a single post, however gallery-dl currently only download the first image on the post and moves on to the next posts. it still can download the other images by copying the rest of image's links however it would be hassle to manually copying each one of them.

@Hrxn
Copy link
Contributor

Hrxn commented Dec 12, 2024

IOW, you're saying it's a site change...

@mikf
Copy link
Owner

mikf commented Dec 12, 2024

Example post: https://www.deviantart.com/justatest235723/art/1133021832

edit: The OAuth API does not seem to support this and returns only the first file.

@defaultd3f4lt
Copy link
Author

ah i see, so for now theres nothing we can do about it unless DA update/adding this support to the OAuth API?

@mikf
Copy link
Owner

mikf commented Dec 12, 2024

... or I finally rewrite and update most DA code to use the "new" API:
https://github.com/mikf/gallery-dl/tree/deviantart-rewrite

@defaultd3f4lt
Copy link
Author

interesting, let me know when this branch merged with the main one

@Newbie1706
Copy link

It's worth noting that the download button on DA's page does not even download the different images.
You can switch to the different images, but the download button still only downloads the first pic 🤔

@AtomicTEM
Copy link

It's worth noting that the download button on DA's page does not even download the different images. You can switch to the different images, but the download button still only downloads the first pic 🤔

Wow Deviantart is just absolutely useless, do that have only one dev or something?

@defaultd3f4lt
Copy link
Author

it's worth to mention that in Deviantart Mobile App (that they haven't updated for a YEAR) also only shows the first image and not the rest, so seems like its more on their side's fault.

alternatively if you still want to use gallery-dl to download those multiple image posts for the time being, i have made some work around for it:

  1. first set the image views to column, then copy all the image links into notepad / TXT file, then save and name it into whatever you want (example: test.txt)
  2. then use this command on your terminal: gallery-dl -i "your_txt_file_name.txt" -D ".../deviantart/artist_name"

note: remember each time you want to download new set of multiple images from a post, you have to manually copy and paste the new image links to the txt file (and don't forget to remove the previous links inside it), also don't forget the path to save the images on the option -D and match the artist_name with the one you want to download.

@fredinno
Copy link

Do you have a general idea of when gallery-dl will finally be compatible with this site feature?

@Scripter17
Copy link
Contributor

Do you have a general idea of when gallery-dl will finally be compatible with this site feature?

For me, paying him usually gets it done faster

For about a year I was sending $30 CAD a month and that got my asks resolved pretty quick

@fredinno
Copy link

Ah.

I mean, this feature seems pretty universally desired.

I guess I will have to wait, since I don't really have the cash.

@Scripter17
Copy link
Contributor

Scripter17 commented Jan 1, 2025

Ah.

I mean, this feature seems pretty universally desired.

I guess I will have to wait, since I don't really have the cash.

I was a bit of a dick to you earlier (though asking for an ETA when you're not paying is, IMO, a bit rude). And since I also need this...

@mikf, I don't suppose I could get one last thing bumped to the top of the queue?

@defaultd3f4lt
Copy link
Author

in the meantime, you can try this workaround i have been using @fredinno

it's worth to mention that in Deviantart Mobile App (that they haven't updated for a YEAR) also only shows the first image and not the rest, so seems like its more on their side's fault.

alternatively if you still want to use gallery-dl to download those multiple image posts for the time being, i have made some work around for it:

  1. first set the image views to column, then copy all the image links into notepad / TXT file, then save and name it into whatever you want (example: test.txt)
  2. then use this command on your terminal: gallery-dl -i "your_txt_file_name.txt" -D ".../deviantart/artist_name"

note: remember each time you want to download new set of multiple images from a post, you have to manually copy and paste the new image links to the txt file (and don't forget to remove the previous links inside it), also don't forget the path to save the images on the option -D and match the artist_name with the one you want to download.

@MarqFJA87
Copy link

in the meantime, you can try this workaround i have been using @fredinno

it's worth to mention that in Deviantart Mobile App (that they haven't updated for a YEAR) also only shows the first image and not the rest, so seems like its more on their side's fault.
alternatively if you still want to use gallery-dl to download those multiple image posts for the time being, i have made some work around for it:

  1. first set the image views to column, then copy all the image links into notepad / TXT file, then save and name it into whatever you want (example: test.txt)
  2. then use this command on your terminal: gallery-dl -i "your_txt_file_name.txt" -D ".../deviantart/artist_name"

note: remember each time you want to download new set of multiple images from a post, you have to manually copy and paste the new image links to the txt file (and don't forget to remove the previous links inside it), also don't forget the path to save the images on the option -D and match the artist_name with the one you want to download.

Unfortunately, this workaround doesn't grab the full-sized images.

@biznizz
Copy link

biznizz commented Feb 5, 2025

Has there been any progress with getting multi-image downloading to work?

I would like to say I'm surprised that DA won't even allow you to download all images in a ZIP file with the download button, but with all the shit they've done lately, I really can't.

@mikf mikf changed the title [Deviantart] Deviantart update: Gallery-dl only download single image from post with multiple images [Deviantart] Gallery-dl only downloads single image from post with multiple images Feb 19, 2025
@mikf mikf unpinned this issue Feb 28, 2025
@fredinno
Copy link

It appears Jdownloader actually works with multiimages on Deviantart: https://board.jdownloader.org/showthread.php?t=96860&page=2

@mikf
Copy link
Owner

mikf commented Mar 28, 2025

Downloading multiple images from single Deviations is now possible: #7261

@biznizz
Copy link

biznizz commented Mar 29, 2025

EDIT: Have finally figured out how to get multi image extraction to work if there is a specific filename specification like what I have.
Leaving this up in case anyone is curious.

Here is my extractor settings for deviantart:

"deviantart":
		{
			"include": "gallery,scraps",
			"refresh-token": "cache",
            "client-id": "SECRET",
			"client-secret": "SECRET",
			"cookies": "C:\\Users\\USER\\cookies.txt",
			"flat": true,
            "folders": false,
            "journals": "html",
            "mature": true,
            "metadata": true,
            "original": true,
		    "quality": 100,
		    "extra": true,
            "wait-min": 5,

            "filename": {
                "is_original": "{category}_{index}_{title}_{num}.{extension}",
                ""           : "LOW_RES_{category}_{index}_{title}_{num}.{extension}"
            }
        
        },

The only downside is that adding the number category to the filename settings results in images having "_1" or "_NONE" in filenames if individual images are downloaded, which can result in duplicate downloads of previously saved images when runing an individual or wider gallery URL fetch.

@mikf
Copy link
Owner

mikf commented Mar 29, 2025

You can use {num:?_//} to ignore the num value when it isn't present,
or use a separate filename format string for single posts:

            "filename": {
                "is_original": "{category}_{index}_{title}.{extension}",
                ""           : "LOW_RES_{category}_{index}_{title}.{extension}"
            },

            "deviation": {
                "filename": {
                    "is_original and count > 1": "{category}_{index}_{title}_{num}.{extension}",
                    "is_original"              : "{category}_{index}_{title}.{extension}",
                    "count > 1"                : "LOW_RES_{category}_{index}_{title}_{num}.{extension}",
                    ""                         : "LOW_RES_{category}_{index}_{title}.{extension}"
                }
            }

@GreenLuthor
Copy link

Does this only work for single posts, or is there a way to get it to work when using the "--range" option as well? (So far I can't get it to work when trying to download multiple posts at once, it still only gives the first picture, but specifying a single page does download all the images.)

@mikf
Copy link
Owner

mikf commented Mar 31, 2025

It currently only works for single posts, yes, but you could theoretically let gallery-dl go over any post collection, write its post URLs to a text file, and feed that into gallery-dl with -i. Not very efficient, but at least it works ... somewhat.

gallery-dl --print-to-file "{url}" posts.txt -o original=0 --no-download https://www.deviantart.com/shimoda7
gallery-dl -i posts.txt

@GreenLuthor
Copy link

Just wanted to say thanks, the workaround is doing the trick so far.

@DrQuantum101
Copy link

DrQuantum101 commented Apr 9, 2025

Update on Implementation Behavior:

The update works as expected when processing public (non-premium) galleries — all posts are downloaded correctly, and the post count is accurate.

However, when processing premium gallery posts there appears to be a bug:
The first image from a premium post is being downloaded twice, even though the total number of posts is still being counted correctly. This only affects premium posts; the rest of the logic seems to function normally. Even when fed the link to the second image directly with the #image-# in the url the improper behavior persists.

I encountered this issue when making a rough helper Python script to implement the solution above by collecting links and downloading them individually. I arrived at an acceptable solution but found that the few premium galleries I had were not being downloaded correctly.

@Ysfggboi Ysfggboi marked this as a duplicate of #7349 Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests