The script functions for me, as long as the phone number entered is 6 digits. You might want to include that in the prompt and add validation.
Also, you initialize prov as ' ', but the final check you perform is against 0, so even an unknown or invalid number won't print "Failed To Identify Provider", hence the lack of any output on an invalid number.
General insights to help you improve the script:
-There's no validation on the number or message. Consider putting the prompts in loops with validation before moving onto the next line
-Either initialize prov to 0, or change prov == 0 to prov == ' ', otherwise it's dead code
-Your current if statements check the entirety of the_page2 every time. Instead, consider searching the_page2 once and assigning the value of the line "Most Likely Provider is unknown" to another variable, then searching that variable instead
-Only one provider should be applicable to a single number, so consider changing the individual if statements into an if, elif, elif, ..., else statement. This would also allow you to use the else block to check for an unidentified number instead of checking the value of prov.
Last edited by passerby
on Thu Feb 20, 2014 6:44 pm, edited 1 time in total.