I'm not really sure if you understood what I wanted to output on the template since you've mentioned that my end goal was to check the availability of the website or I'm not sure if you meant online/offline with website availability
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If your end goal is to check website availability, I would suggest making a HEAD request to it, like so:
Here are the advantages:
ping
command in the osping
checks whether the service responds to a ICMP requestIs there any particular reason you've decided to use
subprocess.check_call(['ping', '-c', '1', page_object.page])
?I'll definitely try this!
I just saw
on stackoverflow so I used. Big lesson for me to understand code before using it.uhhh this doesn't return the online domains.
Wow :O
OK, at this point I can only suggest two things.
Use breakpoint() to inspect the variables inside the view;
Use this code for your reference: github.com/vergeev/17_sites_monito....
Tell me if something new comes up. :)
Here's what I did
Returns nothing :(
I'm not really sure if you understood what I wanted to output on the template since you've mentioned that my end goal was to check the availability of the website or I'm not sure if you meant online/offline with website availability