Remove old file.
This commit is contained in:
parent
aaafebdef1
commit
14e62c4a6c
35
main.py
35
main.py
@ -1,35 +0,0 @@
|
|||||||
import requests
|
|
||||||
from bs4 import BeautifulSoup
|
|
||||||
|
|
||||||
url = 'http://192.168.1.1'
|
|
||||||
|
|
||||||
response = requests.get(url, verify=False)
|
|
||||||
soup = BeautifulSoup(response.text, 'html.parser')
|
|
||||||
snr_element = soup.find('div', id='snr')
|
|
||||||
pci_element = soup.find('div', id='pci')
|
|
||||||
rsrp_element = soup.find('div', id='internetStatusRSRP')
|
|
||||||
rsrq_element = soup.find('div', id='internetStatusRSRQ')
|
|
||||||
|
|
||||||
if snr_element:
|
|
||||||
snr_value = snr_element.text.strip().split()[0] # Extracting the numerical part
|
|
||||||
print(f"SNR value: {snr_value}")
|
|
||||||
else:
|
|
||||||
print("SNR value not found on the page.")
|
|
||||||
|
|
||||||
if pci_element:
|
|
||||||
pci_value = pci_element.text.strip()
|
|
||||||
print(f"PCI value: {pci_value}")
|
|
||||||
else:
|
|
||||||
print("PCI value not found on the page.")
|
|
||||||
|
|
||||||
if rsrp_element:
|
|
||||||
rsrp_value = rsrp_element.text.strip()
|
|
||||||
print(f"RSRP value: {rsrp_value}")
|
|
||||||
else:
|
|
||||||
print("RSRP value not found on the page.")
|
|
||||||
|
|
||||||
if rsrq_element:
|
|
||||||
rsrq_value = rsrq_element.text.strip()
|
|
||||||
print(f"RSRQ value: {rsrq_value}")
|
|
||||||
else:
|
|
||||||
print("RSRQ value not found on the page.")
|
|
||||||
Loading…
x
Reference in New Issue
Block a user