def parse(self, response):
	print(getRandomNumberString(5))
	#print formdata
	#formdata={'AccessAccount': '123456789111111', 'PIN': '12345'},
        return [FormRequest.from_response(response,
                    formdata={'q': 'foo'},
                    callback=self.after_login)]
 def parse(self, response):
     print(getRandomNumberString(5))
     #print formdata
     #formdata={'AccessAccount': '123456789111111', 'PIN': '12345'},
     return [
         FormRequest.from_response(response,
                                   formdata={'q': 'foo'},
                                   callback=self.after_login)
     ]
def getSizeAppropriateDict(response):
    hxs = HtmlXPathSelector(response)
    sizedInputs = hxs.select("//input[@size]")
    postDict = {}
    for sizedInput in sizedInputs:
        inputName = sizedInput.select("./@name")[0].extract()
        print inputName
        inputSize = sizedInput.select("./@size")[0].extract()
        print inputSize
        postDict[inputName] = getRandomNumberString(int(inputSize))
    return postDict
def getSizeAppropriateDict(response):
	hxs = HtmlXPathSelector(response)
	sizedInputs = hxs.select("//input[@size]")
	postDict = {}
	for sizedInput in sizedInputs:
		inputName = sizedInput.select("./@name")[0].extract()
		print inputName
		inputSize = sizedInput.select("./@size")[0].extract()
		print inputSize
		postDict[inputName] = getRandomNumberString(int(inputSize))
	return postDict