Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try:
- output = subprocess.check_output("ping -c 1 %s" % LINK, shell=True)
- except:
- print("Invalid URL")
- OUTPUT
- LINK = https://www.youtube.c
- -->
- ping: www.youtube.c: Name or service not known
- Invalid URL
- >>
- LINK = https://www.youtube.com
- >>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement