Skip to content

Bulk download using --link #450

Answered by Serene-Arc
etba254 asked this question in Q&A
Discussion options

You must be logged in to vote

There is no option to do this through the BDFR itself, however it's fairly trivial to do with common Linux tools. The --link option can be supplied multiple times.

If you wanted to download one link per run, the following would do:

cat ids.txt | xargs -L 1 python3 -m bdfr download <OPTIONS> --link

But it would be more efficient to use multiple links at once. For the that, the following should be sufficient:

cat links.txt | while read line; do echo "--link" $line; done | xargs python3 -m bdfr download <OPTIONS>

If there are a lot of links, then you may run into the maximum line length for any command, so use the -L option of xargs to limit it to a smaller number of links at a time.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Serene-Arc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants