-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.py
64 lines (52 loc) · 3.39 KB
/
options.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
59
60
61
62
63
64
# Configuration file for the handballStats.py script
# --------------------GENERAL OPTIONS-------------------------------------
# Game Progressions
scrapeGameProgressions = True
plotGameProgressions = True # does not actually plot anything anymore, it calculates median performance
# Player Progress
scrapePlayerProgress = True
plotPlayerProgress = False
# Player Stats (not fully implemented yet)
scrapePlayerStats = False
plotPlayerStats = False
# -----------------------------------------------------------------------------
# --------------------TEAM/SEASONS SELECTION-------------------------------------
# SHV-Numbers needed to get the right data. Adjust teams and seasons being processed here:
teams_seasons = {
"Wacker Thun U15 Elite": {"Saison 22_23":[35207]},
"Wacker Thun U17 Elite": {"Saison 22_23":[35200]},
"Wacker Thun NLA": {"Saison 22_23":[35196]}
}
# old configurations
# teams_seasons = {'Wacker Thun U15 Elite':{'Saison 20_21':[32054],'Saison 19_20':[30639],'Saison 18_19':[28999]},
# 'Wacker Thun U17 Elite':{'Saison 20_21':[31846],'Saison 19_20':[30635],'Saison 18_19':[29811]},
# 'Wacker Thun U19 Elite':{'Saison 20_21':[31823],'Saison 19_20':[30371], 'Saison 18_19':[28998]},
# 'Wacker Thun NLA':{'Saison 20_21':[31821],'Saison 19_20':[30644],'Saison 18_19':[28972], 'Saison 17_18':[27795]},
# 'TV Steffisburg NLB':{'Saison 20_21':[32296],'Saison 19_20':[31092], 'Saison 18_19':[29304]},
# 'Wacker Thun 1.Liga':{'Saison 20_21':[31822],'Saison 19_20':[30370], 'Saison 18_19':[28973]}
# }
# teams_seasons = {'TV Steffisburg 3': {'Saison 19_20':[31089],'Saison 18_19':[29306]}
# }
# -----------------------------------------------------------------------------
# --------------------XPATHS FOR SCRAPERS-------------------------------------
# xpaths to information relevant to the scrapers
xpaths = {"playerProgress":{"team_name": r"/html/body/div[3]/div[3]/div/div/div[2]/div/div[2]/h1",
"games_button": r'//*[@id="games-tab"]',
"first_date": r'//*[@id="dateFromGames_1"]',
"second_date": r'//*[@id="dateToGames_1"]',
"click_away": r'//*[@id="games"]/div/div[1]/h2',
"stats_tab": r'//*[@id="stats-tab"]',
"game_date": r'/html/body/div[3]/div[1]/div[1]/div/div/div[2]/div[2]/div[3]/span[1]',
"left_table": r'//*[@id="stats"]/div[2]/div[3]/div[1]/div/table',
"right_table": r'//*[@id="stats"]/div[2]/div[3]/div[2]',
"left_team": r'//*[@id="stats"]/div[2]/div[3]/div[1]/div/table/thead[1]/tr/td/span',
"right_team": r'//*[@id="stats"]/div[2]/div[3]/div[2]/div/table/thead[1]/tr/td/span',
"league": r'/html/body/div[3]/div[1]/div[2]/div/div/div[6]/p',
"date_info": ".//td[1]/span[1]"
},
"gameProgressions":{"tab": r'//*[@id="live-tab"]',
"table": r'//*[@id="live"]/div[3]/div[3]',
"date": r'/html/body/div[3]/div[1]/div[1]/div/div/div[2]/div[2]/div[3]/span[1]'
}
}
# -----------------------------------------------------------------------------