-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
23 lines (19 loc) · 804 Bytes
/
main.py
File metadata and controls
23 lines (19 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from bs4 import BeautifulSoup
from os import system
from time import sleep
#standard location for jiofi homepage
system("wget 192.168.1.1")
src = open("index.html")
document = BeautifulSoup(src,'lxml')
Status = document.find(attrs={"id":"connectedStatus"})
battery_Status = document.find(attrs={"id":"batterystatus"})
number_client = document.find(attrs={"id":"noOfClient"})
Connection_time = document.find(attrs={"id":"ConnectionTime"})
battery_level = document.find(attrs={"id":"batterylevel"})
print("Connection Status : " + Status["value"])
print("Battery State : " + battery_Status["value"])
print("Number Of Client : " + number_client["value"])
print("Connection Time : " + Connection_time["value"])
print("Battery Level : " + battery_level["value"])
src.close()
system("rm index.html")