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

[Ask] Downloading from a specific source #492

Closed
TheGlassEyedVillian opened this issue Nov 28, 2019 · 4 comments
Closed

[Ask] Downloading from a specific source #492

TheGlassEyedVillian opened this issue Nov 28, 2019 · 4 comments

Comments

@TheGlassEyedVillian
Copy link

While downloading a subreddit I realized that the files of the links in the comments of each post of the subreddit which are compatible with gallery-dl are downloaded as well

For example, there is a post which has an image embeded with it on Reddit
But someone in the comment has posted another link which leads to Imgur
Since I only want the reddit link to be downloaded
But now the Imgur link is downloaded as well

so how do I configure gallery-dl so that it only downloads from the sources I mention to be downloaded from?
I can't really figure out how to do that

@Hrxn
Copy link
Contributor

Hrxn commented Nov 28, 2019

Just to be sure: But you want the links from the comments as well, as long as they are images hosted on Reddit, for example?

@mikf
Copy link
Owner

mikf commented Nov 28, 2019

Filtering those links with gallery-dl alone is currently not possible, but you could get all links from a subreddit, write them to a file, filter them there, and input them into gallery-dl again.

$ gallery-dl -g reddit.com/r/subreddit > links.txt
# remove unwanted stuff from links.txt
$ gallery-dl -i links.txt

# or with a pipe, but you'd need grep or similar
$ gallery-dl -g reddit.com/r/subreddit | grep … | gallery-dl -i -

And if you don't want it to fetch links from comments as well, set reddit.comments to 0

@TheGlassEyedVillian
Copy link
Author

Just to be sure: But you want the links from the comments as well, as long as they are images hosted on Reddit, for example?

Kinda, but I want to get not only reddit links but specific links I mention while executing.
For example if there are reddit , imgur and say booru links
I would mention that I only need the links that are from Imgur and Reddit and ignore all the booru links.

@mikf
Copy link
Owner

mikf commented Sep 20, 2020

@TheGlassEyedVillian it's been nearly a year, but there is finally a blacklist and whitelist option in 1.15.0 to control which links to other sites to follow, e.g. "whitelist": ["imgur"] for reddit will only download native Reddit media and stuff from Imgur.

@mikf mikf closed this as completed Sep 20, 2020
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

3 participants