def setup_vars():
reg_variable('USER', 'User for ebay')
reg_variable('PASSWORD', 'Password for ebay')
reg_variable('DRIVER', 'Driver to use with selenium', 'PhantomJS',
validate=lambda v: v in ('Chrome', 'Firefox', 'PhantomJS')
)
reg_variable('LOCALE', 'Localization for numerics and monetary stuff',
validate=lambda v: locale.setlocale(locale.LC_ALL, v)
)
reg_variable('BID_AHEAD_SECONDS', 'How many seconds before the actually specified time the bid should be placed',
value=3, type=int
)
reg_variable('HISTORY', 'History file',
os.path.expanduser("~/.ebay_hist")
)
#reg_variable('COOKIE_FILE', 'File for cookies. (Optional)',
# os.path.expandvars('/tmp/ebay-$USER-cookie')
#)
reg_variable('DEBUG', 'Print stacktraces and write ghostdriver.log', type=bool, value=0)
reg_variable('LOGIN_URL', 'URL for ebay login page', 'https://signin.ebay.de/ws/eBayISAPI.dll?SignIn')
reg_variable('LOGIN_URL_RE', 'RegEx to check if URL is a login page', 'https://signin.ebay.de')
reg_variable('LOGIN_FIELD_PASS_RE', 'RegEx to find password input field in login page', 'passwor')
reg_variable('LOGIN_FIELD_USER_RE', 'RegEx to find user input field in login page', 'e-mail')
评论列表
文章目录