Changing Const Values
Where are they
Default Values: The default values for constants are read from the ofscraper/const/values
folder. This folder contains separate files for different types of values
Custom Configuration (3.7.1 and above): Starting from version 3.7.1, you can override default values with custom values by setting the
"custom_values"
key in your configuration file.Environment Variables (3.10 and above): From version 3.10 onwards, you can also customize values by setting environment variables for the wanted value
What can be changed
timeouts for requests
number of tries for requests
proxy support
flags for certain process
urls used by the program
and much more
How to customize them
To change a constant value in the config, you'll need to provide a dictionary for the custom_values option in advanced_options where the key is the constant value you want to modify and the value is the new value you'd like to assign to it
There is no limit to how many variables can be changed
Example
Syntax is
In the config
should be in advanced_options
Limitations
If you change any OFSCRAPER_*_LIST value you will need to provide the new list manually with --user-list or change default_user_list
changes in KEY_OPTIONS are not accepted in args
configFile and configPath are not changeable
Last updated