Jun-25-2017, 12:59 PM
Hello,
Here is my code.
The code does not do that. here is what I get
I will wait untill someone might know what is wrong with my code.
Thank You
renny
Here is my code.
import requests r = requests.get("http://www.noobmovies.com") if r == 200: print("Website is up and running") else: print("Web site is down") print(r)What the code should do is if I get a status code back of 200 it print out "Website is up and running", other than a 200 it prints "Web site is down"
The code does not do that. here is what I get
Web site is down <Response [200]>I don't know if the 200 is an int or a string. That could be the problem.
I will wait untill someone might know what is wrong with my code.
Thank You
renny
