使用移动宽带设备的Python互联网连接

时间:2019-02-07 00:45:12

标签: python mobile-broadband-api

我是python的新手,我想使用移动宽带设备进行Internet连接,然后ping google.com 或者,如果ping失败,则脚本应连接到移动宽带

谢谢

import urllib
try :
    url_string = "https://www.google.co.in"
    data = urllib.urlopen(url_string)
    print ("Connected")
except:
    print ("not connected" )

同时,我使用以太网连接。我正在寻找一种可以扫描所有可用移动宽带并可以连接到其中的API。有吗?

0 个答案:

没有答案
相关问题