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

Allow global arguments in config file #192

Open
afcruzs opened this issue Nov 28, 2018 · 2 comments
Open

Allow global arguments in config file #192

afcruzs opened this issue Nov 28, 2018 · 2 comments

Comments

@afcruzs
Copy link

afcruzs commented Nov 28, 2018

When using the json config file all the arguments must be set per record. In some cases like chromedriver, the argument is the same across all the records. I propose to read such 'global' arguments for all the records to avoid duplication.

It would be something like:

{
    "chromedriver: "<thepath>",
     "Records": [...]
}

As opposed to:

{
     "Records": [
           { 
                   keywords":"class 1",
                   "chromedriver: "<thepath>"
                    .....
           },
           { 
                   keywords":"class 2",
                   "chromedriver: "<thepath>"
                    .....
           }
           ....
      ]

}

If the global argument is defined in both places (the record and the global section) then we can either override the record specific with the global (or vice versa), or fail the process to force the user to use one of both. I lean towards overwriting the global using the record specific argument.

Based on the arguments from args_list I think should the following should be "global":

  • chromedriver
  • usage_rights
  • exact_size
  • aspect_ratio
  • type
  • specific_site
  • print_paths
  • safe_search
  • language

I'm happy to raise a PR to implement this change if it sounds ok :-)

@shubham-5592
Copy link

created a PR for the same #194

@JulianJB
Copy link

JulianJB commented Apr 7, 2021

Any updates on this request? It would be really useful

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

4 participants