#if response.status_code == 400 or response.text == '' or response.text.find('400 Bad Request') > 0 or response.text.find('404 Not Found') > 0 or response.text.find('404 File Not Found') > 0:
#service = service.split('_')[0].lower()
#if service.rfind('/') > -1:
# to_list = service.split('/')
# service = to_list[len(to_list) - 1].lower()
#if service in list(servicepatterns.keys()):
# service_length = len(servicepatterns[service])
# iterrator = 0
# while (response.status_code == 400 or response.text == '' or response.text.find('400 Bad Request') > 0 or response.text.find('404 Not Found') > 0 or response.text.find('404 File Not Found') > 0) and iterrator < service_length:
ifresponse.status_code==400orresponse.text==''orresponse.text.find('400 Bad Request')>0orresponse.text.find('404 Not Found')>0orresponse.text.find('404 File Not Found')>0:
return''
else:
returnresponse.text
service=service.split('_')[0].lower()
ifservice.rfind('/')>-1:
to_list=service.split('/')
service=to_list[len(to_list)-1].lower()
ifserviceinlist(servicepatterns.keys()):
service_length=len(servicepatterns[service])
iterrator=0
while (response.status_code==400orresponse.text==''orresponse.text.find('400 Bad Request')>0orresponse.text.find('404 Not Found')>0orresponse.text.find('404 File Not Found')>0)anditerrator<service_length:
ifresponse.status_code==400orresponse.text==''orresponse.text.find('400 Bad Request')>0orresponse.text.find('404 Not Found')>0orresponse.text.find('404 File Not Found')>0: