@decorators.switch_to_dir(os.path.dirname(os.path.realpath(__file__)))<EOL>def inputs_options_defaults():
<EOL>if os.path.isfile(PSF_CONSTANTS_FILENAME):<EOL><INDENT>modtime = int(os.path.getmtime(PSF_CONSTANTS_FILENAME))<EOL>curtime = int(time.time())<EOL><DEDENT>if (os.path.isfile(PSF_CONSTANTS_FILENAME)<EOL>and curtime - modtime <= <NUM_LIT:7> * <NUM_LIT> * <NUM_LIT> * <NUM_LIT>):<EOL><INDENT>with open(PSF_CONSTANTS_FILENAME, '<STR_LIT:r>') as const_f:<EOL><INDENT>def_dict = json.load(const_f)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>print('<STR_LIT>')<EOL>html = utils.get_html(PSF_URL)<EOL>doc = pq(html)<EOL>def_dict = {}<EOL>for inp in doc('<STR_LIT>'):<EOL><INDENT>name = inp.attrib['<STR_LIT:name>']<EOL>if name not in def_dict:<EOL><INDENT>def_dict[name] = {<EOL>'<STR_LIT:value>': set(),<EOL>'<STR_LIT>': set(),<EOL>'<STR_LIT:type>': inp.attrib['<STR_LIT:type>']<EOL>}<EOL><DEDENT>if inp.attrib['<STR_LIT:type>'] in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>if '<STR_LIT>' in inp.attrib:<EOL><INDENT>def_dict[name]['<STR_LIT:value>'].add(inp.attrib['<STR_LIT:value>'])<EOL><DEDENT>def_dict[name]['<STR_LIT>'].add(inp.attrib['<STR_LIT:value>'])<EOL><DEDENT>else:<EOL><INDENT>def_dict[name]['<STR_LIT:value>'].add(inp.attrib.get('<STR_LIT:value>', '<STR_LIT>'))<EOL><DEDENT><DEDENT>for sel in doc.items('<STR_LIT>'):<EOL><INDENT>name = sel.attr['<STR_LIT:name>']<EOL>if name not in def_dict:<EOL><INDENT>def_dict[name] = {<EOL>'<STR_LIT:value>': set(),<EOL>'<STR_LIT>': set(),<EOL>'<STR_LIT:type>': '<STR_LIT>'<EOL>}<EOL><DEDENT>defaultOpt = sel('<STR_LIT>')<EOL>if len(defaultOpt):<EOL><INDENT>defaultOpt = defaultOpt[<NUM_LIT:0>]<EOL>def_dict[name]['<STR_LIT:value>'].add(defaultOpt.attrib.get('<STR_LIT:value>', '<STR_LIT>'))<EOL><DEDENT>else:<EOL><INDENT>def_dict[name]['<STR_LIT:value>'].add(<EOL>sel('<STR_LIT>')[<NUM_LIT:0>].attrib.get('<STR_LIT:value>', '<STR_LIT>')<EOL>)<EOL><DEDENT>def_dict[name]['<STR_LIT>'] = {<EOL>opt.attrib['<STR_LIT:value>'] for opt in sel('<STR_LIT>')<EOL>if opt.attrib.get('<STR_LIT:value>')<EOL>}<EOL><DEDENT>def_dict.pop('<STR_LIT>', None)<EOL>def_dict.pop('<STR_LIT>', None)<EOL>with open(PSF_CONSTANTS_FILENAME, '<STR_LIT>') as f:<EOL><INDENT>for k in def_dict:<EOL><INDENT>try:<EOL><INDENT>def_dict[k]['<STR_LIT:value>'] = sorted(<EOL>list(def_dict[k]['<STR_LIT:value>']), key=int<EOL>)<EOL>def_dict[k]['<STR_LIT>'] = sorted(<EOL>list(def_dict[k]['<STR_LIT>']), key=int<EOL>)<EOL><DEDENT>except Exception:<EOL><INDENT>def_dict[k]['<STR_LIT:value>'] = sorted(list(def_dict[k]['<STR_LIT:value>']))<EOL>def_dict[k]['<STR_LIT>'] = sorted(<EOL>list(def_dict[k]['<STR_LIT>'])<EOL>)<EOL><DEDENT><DEDENT>json.dump(def_dict, f)<EOL><DEDENT><DEDENT>return def_dict<EOL>
Handles scraping options for player-season finder form.

    :returns: {'name1': {'value': val, 'options': [opt1, ...] }, ... }