forked from chhavitekriwal/wimp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
57 lines (53 loc) · 1.96 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# config.py
HEADERS = {
'Accept': 'application/json, text/javascript, */*; q=0.01',
'Accept-Encoding': 'gzip, deflate, br, zstd',
'Accept-Language': 'en-GB,en;q=0.8',
'Connection': 'keep-alive',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Host': 'www.iitkgp.ac.in',
'Origin': 'https://www.iitkgp.ac.in',
'Referer': 'https://www.iitkgp.ac.in/faclistbydepartment',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-origin',
'Sec-GPC': '1',
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36',
'X-Requested-With': 'XMLHttpRequest',
'sec-ch-ua': '"Not/A)Brand";v="8", "Chromium";v="126", "Brave";v="126"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Linux"'
}
start = 0 # Start index for pagination
length = 10 # Number of records to fetch per request
more_pages = True # Flag to indicate if there are more pages to fetch
draw = 1 # Counter for pagination requests
# You can define a default payload here, or leave it empty to be set in main.py
DEFAULT_PAYLOAD = {
'draw': draw,
'columns[0][data]': 'empname',
'columns[0][name]': '',
'columns[0][searchable]': 'true',
'columns[0][orderable]': 'true',
'columns[0][search][value]': '',
'columns[0][search][regex]': 'false',
'columns[1][data]': 'department',
'columns[1][name]': '',
'columns[1][searchable]': 'true',
'columns[1][orderable]': 'true',
'columns[1][search][value]': '',
'columns[1][search][regex]': 'false',
'columns[2][data]': 'designation',
'columns[2][name]': '',
'columns[2][searchable]': 'true',
'columns[2][orderable]': 'true',
'columns[2][search][value]': '',
'columns[2][search][regex]': 'false',
'order[0][column]': '0',
'order[0][dir]': 'asc',
'start': start,
'length': length,
'search[value]': '',
'search[regex]': 'false',
'lang': 'en'
}