lord63 / isitup Goto Github PK
View Code? Open in Web Editor NEWCheck whether a website is up or down.
License: MIT License
Check whether a website is up or down.
License: MIT License
I stumbled upon this coming from https://github.com/sindresorhus/is-up-cli which inspired this project.
The nice thing about is-up-cli is that it returns a specific error code when the site is down and can therefore be used in automated scripts.
My use case is the following:
I want to check if my self-hosted website is reachable from the internet and otherwise restart the Raspberry Pi where it's hosted. I'm struggling with a few network issues -- which I don't quite understand right now -- that go away when I reboot the Pi.
A simple way to test this is to run the following code in a Shell:
# Do something in case the page is up.
isitup nope.it.isnt && echo "Hell yeah! Everything's fine"
# Do something in case the page is down.
isitup nope.it.isnt || echo "Site is down"
I'd rather like to use this tool as it is written in Python which I understand and have the environment for on every machine. For is-up-cli I would need to install node.js and npm.
Upon running isitup
initially, I received this warning.
InsecurePlatformWarning: A true [135/661]
A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
Now I did fix this, but I am writing up this issue to help others who may come across this.
I received this error when installing using pip install isitup
as is stated to do in the instructions. However, I have Python 2.7 and Python 3.4 installed on my machine, the default pip
for me installed isitup for Python 2.7.
The problem was fixed when I ran these lines:
pip uninstall isitup
pip3 install isitup
I would also recommend the reader first making sure pip is updated and installed for Python 3 by following these instructions first.
Sorry for that, will add the user agent and release a new version tomorrow.
Any client (browser or bot) must provide an accurate and appropriate user agent description when using isitup and it's api.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.