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

multiple --wpull-args #208

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions libgrabsite/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def is_multicast(text):
@click.option('--ua', default="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0",
metavar='STRING', help='Send User-Agent: STRING instead of pretending to be Firefox on Windows.')

@click.option('--wpull-args', default="",
@click.option('--wpull-args', multiple=True, default=[],
metavar='ARGS', help=
r'String containing additional arguments to pass to wpull; '
r'see ~/.local/bin/wpull --help. ARGS is split with shlex.split '
Expand Down Expand Up @@ -267,7 +267,8 @@ def main(concurrency, concurrent, delay, recursive, offsite_links, igsets,
args += ["--recursive"]

if wpull_args:
args += shlex.split(wpull_args)
for called_argument in wpull_args:
args += shlex.split(called_argument)

DIR_input_file = os.path.join(working_dir, "input_file")
if start_url:
Expand Down