Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4762 Lượt xem

Hi

I try to simulate the functionallity which happens while exporting a record. This url is used:
web/export/csv

I analysed whats happening and if I set the session_id and token manually it's working fine. Now what I try to do is to get the session_id in my script but I have no success so far.


session = requests.Session()
session_id = session.get('http://url').cookies.get_dict()["session_id"]


I get a session_id with the code above but I guess it's not from a authenticated user.

So my question is how do I get a session_id from a authenticated user? I can login with xmlrpc interface just fine, but I didn't find any information how to get to the session_id.

Thank you for your help

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

The solution [1] was to make a request to web/session/authenticate to get the session_id of a authenticated user.

[1] http://www.vernichon.fr/?p=1179


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 11 15
5739
1
thg 11 22
3827
0
thg 12 21
3045
1
thg 11 16
9056
2
thg 11 22
6399