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

[Feature Request] Extractor for Deviantart gallery search #1695

Closed
KonoVitoDa opened this issue Jul 14, 2021 · 13 comments
Closed

[Feature Request] Extractor for Deviantart gallery search #1695

KonoVitoDa opened this issue Jul 14, 2021 · 13 comments

Comments

@KonoVitoDa
Copy link

Although a extractor for user galleries is already present, it doesn't works if you try to download the results of a search did in a given gallery. Example:
gallery-dl https://www.deviantart.com/otakurenders-service/gallery?q=isuzu
[gallery-dl][error] No suitable extractor found for 'https://www.deviantart.com/otakurenders-service/gallery?q=isuzu'

@KonoVitoDa KonoVitoDa changed the title [Feature Request] Extractor for Deviantart in-gallery search [Feature Request] Extractor for Deviantart gallery search Jul 14, 2021
rautamiekka added a commit to rautamiekka/gallery-dl that referenced this issue Jul 14, 2021
@rautamiekka
Copy link
Contributor

Can't promise I fixed it, but I tried, 0135am no less.

@KonoVitoDa
Copy link
Author

Can't promise I fixed it, but I tried, 0135am no less.

Still not working, I got same error :(
I already upgraded gallery-dl to the latest version (1.18.1).

@rautamiekka
Copy link
Contributor

gallery-dl, like youtube-dl, is manually published, and evidently mikf has to manually approve a PR before the code starts compiling, so you need to wait for that.

Once he approves (and preferably wait for the compilation to succeed) you need to download the whole source code and that way test it by running the __main__.py with your params and flags.

@KonoVitoDa
Copy link
Author

Got it, I'll wait. How long does it usually take?

@mikf
Copy link
Owner

mikf commented Jul 15, 2021

With #1696 it would accept those gallery search URLs, but it wouldn't do the requested search and just download the same as /gallery/all.

Actually implementing this feature is also more or less impossible as long as gallery-dl uses the official OAuth API, simply because it doesn't provide that functionality. gallery-dl could theoretically go through all possible results and try to manually apply a search filter, or we start using the Eclipse API (https://github.com/mikf/gallery-dl/tree/deviantart-rewrite)

Me approving the PR wouldn't compile anything, by the way. It'd only run the tests from https://github.com/mikf/gallery-dl/blob/master/.github/workflows/tests.yml

@rautamiekka
Copy link
Contributor

With #1696 it would accept those gallery search URLs, but it wouldn't do the requested search and just download the same as /gallery/all.

Ya, I figured that's the price to pay since DA's search facility is 99% useless since Eclipse.

Actually implementing this feature is also more or less impossible as long as gallery-dl uses the official OAuth API, simply because it doesn't provide that functionality. gallery-dl could theoretically go through all possible results and try to manually apply a search filter, or we start using the Eclipse API (https://github.com/mikf/gallery-dl/tree/deviantart-rewrite)

Huh. Didn't know there was another API.

Me approving the PR wouldn't compile anything, by the way. It'd only run the tests from https://github.com/mikf/gallery-dl/blob/master/.github/workflows/tests.yml

Ah ok. Well, as far as seeing whether the PR even works, the result is the same.

@rautamiekka
Copy link
Contributor

Committed a fix for the tests, I haven't quite learnt how to use GitHub to show that here, but it's visible in the PR.

I linked to a regex101 piece where all the tests succeed fine, and I tried to DL using OP's link, which worked perfectly fine too.

@rautamiekka
Copy link
Contributor

rautamiekka commented Aug 10, 2021

I'm just gonna admit defeat so that someone with better Git understanding (and the motivation) can get it through. I think you can see why I had a strong dislike for Git from the maintaining standpoint.

@left1000
Copy link

There are some other fringe dA cases I'm curious about, like what about outside of users just exploring tags?

@KonoVitoDa
Copy link
Author

Still no solution? :(

@hyzchip
Copy link

hyzchip commented May 21, 2022

There is actually a bit of a loophole. In the search box at the very top of the page, enter the following (replacing the search text and username, of course):
insert search text here username:insertusernamehere

This means that for the example in the first post, the correct URL to pass to gallery-dl would be:
https://www.deviantart.com/search?q=isuzu+username%3Aotakurenders

The only problem is that it fails to work with users with a - in their username. With the example in the original post, stripping everything that comes after the - (leaving only "otakurenders") is still precise enough to return the appropriate results. Unfortunately, this is not always realistic: for example, a search for hypothetical user "the-artist" would return everything with the search text by all accounts with either "the" or "artist" in the username.

@left1000
Copy link

left1000 commented Jul 9, 2022

There is actually a bit of a loophole. In the search box at the very top of the page, enter the following (replacing the search text and username, of course): insert search text here username:insertusernamehere

This means that for the example in the first post, the correct URL to pass to gallery-dl would be: https://www.deviantart.com/search?q=isuzu+username%3Aotakurenders

The only problem is that it fails to work with users with a - in their username. With the example in the original post, stripping everything that comes after the - (leaving only "otakurenders") is still precise enough to return the appropriate results. Unfortunately, this is not always realistic: for example, a search for hypothetical user "the-artist" would return everything with the search text by all accounts with either "the" or "artist" in the username.

This works great!~ only problem is that the folder structure becomes popular all-time keyword username_[username] rather than just [username] like it would be with a normal rip command.... anyway to alter that? (atm I'm moving the files over afterwards manually but that prevent rerips from noticing a file already exists and skipping that download)

@hyzchip
Copy link

hyzchip commented Jul 31, 2022

This works great!~ only problem is that the folder structure becomes popular all-time keyword username_[username] rather than just [username] like it would be with a normal rip command.... anyway to alter that? (atm I'm moving the files over afterwards manually but that prevent rerips from noticing a file already exists and skipping that download)

The first option for this would be to use symbolic links so that the "popular" folders all point to just [username], which is what I have been doing. Alternatively, perhaps the option extractor.*.directory might help (I haven't tried this myself though): https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst

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

5 participants