We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e119a9 commit 29b8c76Copy full SHA for 29b8c76
mozloc.py
@@ -16,7 +16,7 @@
16
from time import sleep
17
18
URL='https://location.services.mozilla.com/v1/geolocate?key=test'
19
-NMCMD = ['nmcli','-fields','BSSID,FREQ,SIGNAL','device','wifi']
+NMCMD = ['nmcli','-fields','SSID,BSSID,FREQ,SIGNAL','device','wifi']
20
NMSCAN = ['nmcli','device','wifi','rescan']
21
22
@@ -31,8 +31,10 @@ def get_nmcli():
31
print('consider slowing scan cadence. {}'.format(e))
32
33
dat = pandas.read_csv(BytesIO(ret), sep='\s+', index_col=False,
34
- header=0,usecols=[0,1,3],
35
- names=['macAddress','frequency','signalStrength'])
+ header=0,usecols=[0,1,2,4], encoding='utf8',
+ names=['ssid','macAddress','frequency','signalStrength'])
36
+# %% optout
37
+ dat = dat[~dat['ssid'].str.endswith('_nomap')]
38
# %% JSON
39
jdat = dat.to_json(orient='records')
40
jdat = '{ "wifiAccessPoints":' + jdat + '}'
0 commit comments