Example #1
0
def start_threads_for_letter(startLetter):
  outFn = "voters_"+str(startLetter)+".txt"
  outFile = open(outFn, 'w')
  
  print("Getting records starting with " + startLetter)

  scp = Scraper(conf.sessionHeaders, conf.searchHeaders)
  scp.setup_session([conf.baseUrl, conf.rollSearchUrl])
 
  url = conf.searchUrl
  params = conf.searchParams

  params['electorName'] = startLetter

  scp.get_and_write_records(url, 0, params, outFile)