wikicrawl/settings.py

32 lines
1.2 KiB
Python

# Application run-time configuration/settings. This contains variables
# that control how the program works but are kept separate from the
# program. It makes sense for certain parameters to be adjustable but
# not hard-coded into the application. For example, some users may want
# to run this program in English while others may want to run in Spanish.
# The way this works is we specify those variables external from the
# application (here) and pass them into the application (app.config module).
# The application then references app.config.obj to access the variables
# passed in from here.
import logging
class DefaultSettings:
# Application Parameters
LOG_LEVEL = logging.INFO
DO_BREAKPOINTS = True
PAGE_DELAY = 0
# Web Driver Parameters
WEBDRIVER_USER_AGENT = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/5.0)'
WEBDRIVER_BROWSER = 'chrome' # Options are 'chrome', 'firefox'
# Wikipedia Parameters
PAGE_BASE_URL = 'https://www.wikipedia.org/'
PAGE_LANGUAGE = 'English'
# PAGE_LANGUAGE = 'Español'
# PAGE_LANGUAGE = 'Русский'
# Data Layer Parameters
SQLITE_DBFILE = '/home/mathew/.wikicrawler.db'