Skip to content

Commit 3ae43e6

Browse files
committed
test
1 parent 1c5061b commit 3ae43e6

File tree

2 files changed

+37
-163
lines changed

2 files changed

+37
-163
lines changed

test/moni2.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#coding:utf-8
2+
import requests
3+
from pprint import pprint
4+
info_login_url = "http://portal.ccnu.edu.cn/loginAction.do"
5+
link_url = "http://portal.ccnu.edu.cn/roamingAction.do?appId=XK"
6+
login_ticket_url = "http://122.204.187.6/xtgl/login_tickitLogin.html"
7+
headers = {
8+
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36",
9+
}
10+
11+
post_data = {
12+
'userName': 2016210942,
13+
'userPass': 130395
14+
}
15+
16+
_cookie_jar = None
17+
18+
s = requests.Session()
19+
r = s.post(info_login_url,data = post_data)
20+
if r.text.split('"')[1] == 'index_jg.jsp':
21+
r_second = s.get(link_url,timeout = 4)
22+
r_third = s.get(login_ticket_url,timeout = 4)
23+
ret = s.__dict__
24+
cookies = ret['cookies']
25+
26+
27+
_cookie_jar = s.__dict__.get('_cookie_jar')
28+
29+
pprint(s.__dict__)
30+
print('\n\n\n\n')
31+
32+
33+
print cookies.keys()
34+
35+
36+
37+

test/test.py

Lines changed: 0 additions & 163 deletions
This file was deleted.

0 commit comments

Comments
 (0)