code: def action_webimport(hrlinetop=False):
      
      DIR_OPTIONS = {1: "http://lov.okfn.org", 2: "http://prefix.cc/popular/"}
      selection = None
      while True:
          if hrlinetop:
              printDebug("----------")
          text = "Please select which online directory to scan: (enter=quit)\n"
          for x in DIR_OPTIONS:
              text += "%d) %s\n" % (x, DIR_OPTIONS[x])
          var = input(text + "> ")
          if var == "q" or var == "":
              return None
          else:
              try:
                  selection = int(var)
                  test = DIR_OPTIONS[selection]  #throw exception if number wrong
                  break
              except:
                  printDebug("Invalid selection. Please try again.", "important")
                  continue
  
      printDebug("----------")
      text = "Search for a specific keyword? (enter=show all)\n"
      var = input(text + "> ")
      keyword = var
  
      try:
          if selection == 1:
              _import_LOV(keyword=keyword)
          elif selection == 2:
              _import_PREFIXCC(keyword=keyword)
      except:
          printDebug("Sorry, the online repository seems to be unreachable.")
  
      return True
docs: select from the available online directories for import