Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to check if a proxy is dead in python

import os

ip_list = ['8.8.8.8:8888']
for ip in ip_list:
    response = os.popen(f"ping {ip}").read()
    if "Received = 4" in response:
        print(f"UP {ip} Ping Successful")
    else:
        print(f"DOWN {ip} Ping Unsuccessful")
Comment

PREVIOUS NEXT
Code Example
Python :: write specific columns to csv pandas 
Python :: face detection 
Python :: python round up 
Python :: python list to string with spaces 
Python :: permutations python 
Python :: python set label colour 
Python :: os walk example 
Python :: list of files in python 
Python :: python transfer file 
Python :: likeliness python 
Python :: undo cell delete kaggle 
Python :: dictionary in python does not support append operation 
Python :: discord.py get a bot online 
Python :: python csv dictwriter 
Python :: python class get attribute by name 
Python :: OneHotEncoder sklearn python 
Python :: scientific notation to decimal python 
Python :: number of columns with no missing values 
Python :: python dictionary get keys with condition on value 
Python :: Plotting keras model trainning history 
Python :: how to change the rate of speech in pyttsx3 
Python :: python check disk space 
Python :: python no new line 
Python :: python r before string 
Python :: python csv add row 
Python :: backwards loop over list in python 
Python :: pyqt5 latex 
Python :: python how to copy a 2d array leaving out last column 
Python :: delete turtle 
Python :: python define 2d table 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =