-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.py
58 lines (30 loc) · 964 Bytes
/
utils.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
57
58
from personal_info import get_cookie_dict
def get_data_path():
data_path = "data_v3/"
return data_path
def get_tag_file_name():
tag_file_name = get_data_path() + "tags.json"
return tag_file_name
def get_input_file_name():
input_file_name = get_data_path() + "inputs.json"
return input_file_name
def get_result_file_name():
result_file_name = get_data_path() + "results.json"
return result_file_name
def get_steam_id():
steam_id = '76561198028705366'
return steam_id
def get_session_id():
cookies = get_cookie_dict()
session_id = cookies['sessionid']
return session_id
def get_recommender_url(steam_id=None):
if steam_id is None:
steam_id = get_steam_id()
recommender_url = "https://store.steampowered.com/recommender/" + steam_id + "/"
return recommender_url
def main():
recommender_url = get_recommender_url()
return
if __name__ == '__main__':
main()