Aug-10-2017, 03:31 AM
I have a Raspberry Pi connected to a Verizon MiFi LTE modem/router. I am trying to scrape the RSSI signal from the 'welcome page' of the device. No login is required and I'm able to get the 200 status code and also view the page content. I'm not really sure where to go from there. I'm not sure any lxml class would recognize it. Any ideas?
returns []
Here is what Chrome inspector shows -
The div changes with the number of bars displayed.
Thank you.
1 2 3 4 5 6 7 8 9 10 |
from lxml import html import requests page = requests.get( '<removed>' , headers = { 'User-Agent' : 'test' }) tree = html.fromstring(page.content) rssi = tree.xpath( '//*[@id="statusBar_rssi"]' ) print (rssi) |
Here is what Chrome inspector shows -
1 |
<li id = "item_statusBar_rssi" ><span id = "statusBar_rssi" style = " "><div class=" rssi_4">< / div>Data< / span>< / li> |
Thank you.