- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathd.py
More file actions
Latest commit
22 lines (15 loc) · 545 Bytes
/
Copy pathd.py
File metadata and controls
22 lines (15 loc) · 545 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
importjson
importrequests
importitertools
fromrequests.authimportHTTPBasicAuth
fromrequests.packages.urllib3.exceptionsimportInsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
s=requests.session()
uri='https://10.195.168.110/dataservice/template/config/running/11OD152130107'
response_get=s.get(uri, auth=HTTPBasicAuth('deepesh', 'deepesh4321!') , verify=False)
#print response_get
f=response_get.json()
#print f['config']
g=open('runconf1.txt', 'w')
g.write(f['config'])
g.close