예제 #1
0
파일: scraper.py 프로젝트: alecgorge/grouch
 def iter_options():
     for o in select.findAll("option"):
         term = Term.parse(o.text)
         if term:
             attrs = dict(o.attrs)
             yield (term, attrs["value"])
예제 #2
0
 def iter_options():
     for o in select.findAll('option'):
         term = Term.parse(o.text)
         if term:
             attrs = dict(o.attrs)
             yield (term, attrs['value'])
예제 #3
0
파일: ui.py 프로젝트: alecgorge/grouch
def term_type(value):
    term = Term.parse(value)
    if term is None:
        raise argparse.ArgumentTypeError("invalid format")
    return term