mechanize python xe 234

Solutions on MaxInterview for mechanize python xe 234 by the best coders in the world

showing results for - "mechanize python xe 234"
Elías
21 Jan 2018
1def wiglePrint(username, password, netid):
2    browser = mechanize.Browser()
3    browser.open('https://wigle.net')
4    #构造请求数据
5    reqData = urllib.urlencode({'credential_0':username, 'credential_1':password})
6    #请求登录
7    browser.open('https://wigle.net/gps/gps/main/login', reqData)
8    params = {}
9    params['netid'] = netid
10    reqParams = urllib.urlencode(params)
11    respURL = 'https://wigle.net/gps/gps/main/confirmquery/'
12    resp = browser.open(respURL, reqParams).read()
13    print str(resp)
14    mapLat = 'N/A'
15    mapLon = 'N/A'
16    rLat = re.findall(search_lat, resp)
17    if rLat:
18        mapLat = rLat[0].split('&')[0].split('=')[1]
19    rLon = re.findall(search_lon, resp)
20    if rLon:
21        mapLon = rLon[0].split
22    print '[-] Lat: ' + mapLat + ', Lon: ' + mapLon 
similar questions
queries leading to this page
mechanize python xe 234