OF-Scraper
  • Welcome
  • Requirements
  • Install
    • Pre-Install Guides
      • Linux
      • Windows
      • Mac
    • PIPX Install
    • PIP Install
    • Binary Releases
    • Docker
    • Release Info
    • Managing Multiple Python Versions
  • Getting Started and Settings
    • Config Options
      • Config Location
      • General Options
      • File Output Options
        • Placeholders
        • Responsetype Placeholders
      • Download Options
        • Download Toggles
        • Media Filtering Options
        • Advanced Download Options
      • Setting metadata path
      • Binaries Options
      • CDM Options
      • Performance Options
        • Values to Pick
      • Script Options
      • Advanced config options
        • Changing Const Values
        • Mediatype overwrites
    • Depreciated Options
    • Auth
    • Controlling Output/Logs
    • Migrating from Digitalcriminal's script
  • Using the Scraper
    • Using Prompts
      • Old Menu
      • Page 2
    • Username selection or Fuzzy Search
    • Basic Automation with command-line
      • Basic Actions
        • Liking/Unliking Post
        • Downloading Content
          • Downloading Text Files
          • Downloading Purchases From Deleted Models
        • Multiple Actions
      • Model Filtering/Sorting
        • Price Filtering/Sort
      • Advanced Args
      • Scripting tips
      • Enable label scan
    • Recipes
      • Adding Proxy
      • Redownload Deleted Downloads
  • Content Check Modes
    • Table Columns
    • Table Management
      • Pre 3.10.7 filtering
  • Scraping Individual Posts or Media
  • Metadata
    • Schema
    • Creating Metadata
    • Metadata location
  • CDM Setup
    • CDM issues
  • FAQ/Common Issues
    • Page 1
  • Command Reference
    • Shared Options
      • General Program Options
        • Program Options
        • Logging Options
        • Filename Modification Options
        • Media Filters Options
        • Download Options
        • Advanced Program Options
      • Shared Scrape and Metadata Check Mode Options
        • User List Filter Options
          • Advanced User Filters
        • User Selection Options
        • Model Sorting & Processing Options
        • Content Options
        • Automation Options
        • Advanced Search & Processing Options
    • Main Scraper Options
    • Metadata Check Mode Options
    • Content Check Modes Options
    • Manual Mode Options
  • Request Change to Doc
  • Testing
Powered by GitBook
On this page
  • Where are they
  • What can be changed
  • How to customize them
  • Example
  • Syntax is
  • In the config
  • Limitations
  1. Getting Started and Settings
  2. Config Options
  3. Advanced config options

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

Custom_Variable:Value,
Custom_Variable2:Value

In the config

  • should be in advanced_options

.....
  : {
        "code-execution": false,
        "dynamic-mode-default": "deviint",
        "backend": "aio",
        "downloadbars": true,
        "cache-mode": "sqlite",
        "appendlog": false,
        "custom_values": {
            "DISCORD_THREAD_OVERRIDE": false,
            "REMOVE_UNVIEWABLE_METADATA": false,
            "API_DISPLAY": false
        },
        "sanitize_text": false,
        "temp_dir": null,
        "remove_hash_match": false,
        "infinite_loop_action_mode": false,
        "post_download_script": null,
        "disable_auto_after": false,
        "default_user_list": "main",
        "default_black_list": ""
    },
`

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

PreviousAdvanced config optionsNextMediatype overwrites

Last updated 11 months ago