TopDownHockey-Scraper 3.2.6__py3-none-any.whl → 3.2.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of TopDownHockey-Scraper might be problematic. Click here for more details.
- TopDownHockey_Scraper/TopDownHockey_EliteProspects_Scraper.py +6 -6
- TopDownHockey_Scraper/TopDownHockey_NHL_Scraper.py +10 -2
- {TopDownHockey_Scraper-3.2.6.dist-info → TopDownHockey_Scraper-3.2.8.dist-info}/METADATA +1 -1
- TopDownHockey_Scraper-3.2.8.dist-info/RECORD +7 -0
- TopDownHockey_Scraper-3.2.6.dist-info/RECORD +0 -7
- {TopDownHockey_Scraper-3.2.6.dist-info → TopDownHockey_Scraper-3.2.8.dist-info}/LICENSE +0 -0
- {TopDownHockey_Scraper-3.2.6.dist-info → TopDownHockey_Scraper-3.2.8.dist-info}/WHEEL +0 -0
- {TopDownHockey_Scraper-3.2.6.dist-info → TopDownHockey_Scraper-3.2.8.dist-info}/top_level.txt +0 -0
|
@@ -28,10 +28,10 @@ def tableDataText(table):
|
|
|
28
28
|
|
|
29
29
|
headerow = [td.get_text(strip=True) for td in trs[0].find_all('th')] # header row
|
|
30
30
|
if headerow: # if there is a header row include first
|
|
31
|
-
rows.
|
|
31
|
+
rows.append(headerow)
|
|
32
32
|
trs = trs[1:]
|
|
33
33
|
for tr in trs: # for every table row
|
|
34
|
-
rows.
|
|
34
|
+
rows.append([td.get_text(strip=True) for td in tr.find_all('td')]) # data row
|
|
35
35
|
|
|
36
36
|
df_rows = pd.DataFrame(rows[1:], columns=rows[0])
|
|
37
37
|
|
|
@@ -97,7 +97,7 @@ def getskaters(league, year):
|
|
|
97
97
|
# Extract href links in table
|
|
98
98
|
href_row = []
|
|
99
99
|
for link in player_table.find_all('a'):
|
|
100
|
-
href_row.
|
|
100
|
+
href_row.append(link.attrs['href'])
|
|
101
101
|
|
|
102
102
|
# Create data frame, rename and only keep links to players
|
|
103
103
|
df_links = pd.DataFrame(href_row)
|
|
@@ -107,7 +107,7 @@ def getskaters(league, year):
|
|
|
107
107
|
# Add links to players
|
|
108
108
|
df_players['link']=df_links['link']
|
|
109
109
|
|
|
110
|
-
players.
|
|
110
|
+
players.append(df_players)
|
|
111
111
|
|
|
112
112
|
# Wait 3 seconds before going to next
|
|
113
113
|
#time.sleep(1)
|
|
@@ -209,7 +209,7 @@ def getgoalies(league, year):
|
|
|
209
209
|
# Extract href links in table
|
|
210
210
|
href_row = []
|
|
211
211
|
for link in player_table.find_all('a'):
|
|
212
|
-
href_row.
|
|
212
|
+
href_row.append(link.attrs['href'])
|
|
213
213
|
|
|
214
214
|
# Create data frame, rename and only keep links to players
|
|
215
215
|
df_links = pd.DataFrame(href_row)
|
|
@@ -219,7 +219,7 @@ def getgoalies(league, year):
|
|
|
219
219
|
# Add links to players
|
|
220
220
|
df_players['link']=df_links['link']
|
|
221
221
|
|
|
222
|
-
players.
|
|
222
|
+
players.append(df_players)
|
|
223
223
|
|
|
224
224
|
# Wait 3 seconds before going to next
|
|
225
225
|
# time.sleep(1)
|
|
@@ -1951,8 +1951,10 @@ def scrape_espn_ids_single_game(game_date, home_team, away_team):
|
|
|
1951
1951
|
np.where(gamedays.away_team=='BLACKHAWKS', 'CHI',
|
|
1952
1952
|
np.where(gamedays.away_team=='AVALANCHE', 'COL',
|
|
1953
1953
|
np.where(gamedays.away_team=='BLUE', 'CBJ',
|
|
1954
|
+
np.where(gamedays.away_team=='JACKETS', 'CBJ',
|
|
1954
1955
|
np.where(gamedays.away_team=='STARS', 'DAL',
|
|
1955
1956
|
np.where(gamedays.away_team=='RED', 'DET',
|
|
1957
|
+
np.where(gamedays.away_team=='WINGS', 'DET',
|
|
1956
1958
|
np.where(gamedays.away_team=='OILERS', 'EDM',
|
|
1957
1959
|
np.where(gamedays.away_team=='PANTHERS', 'FLA',
|
|
1958
1960
|
np.where(gamedays.away_team=='KINGS', 'LAK',
|
|
@@ -1969,12 +1971,14 @@ def scrape_espn_ids_single_game(game_date, home_team, away_team):
|
|
|
1969
1971
|
np.where(gamedays.away_team=='KRAKEN', 'SEA',
|
|
1970
1972
|
np.where(gamedays.away_team=='BLUES', 'STL',
|
|
1971
1973
|
np.where(gamedays.away_team=='LIGHTNING', 'TBL',
|
|
1974
|
+
np.where(gamedays.away_team=='LEAFS', 'TOR',
|
|
1972
1975
|
np.where(gamedays.away_team=='MAPLE', 'TOR',
|
|
1973
1976
|
np.where(gamedays.away_team=='CANUCKS', 'VAN',
|
|
1974
1977
|
np.where(gamedays.away_team=='GOLDEN', 'VGK',
|
|
1978
|
+
np.where(gamedays.away_team=='KNIGHTS', 'VGK',
|
|
1975
1979
|
np.where(gamedays.away_team=='CAPITALS', 'WSH',
|
|
1976
1980
|
np.where(gamedays.away_team=='JETS', 'WPG', 'mistake'
|
|
1977
|
-
))))))))))))))))))))))))))))))))
|
|
1981
|
+
))))))))))))))))))))))))))))))))))))
|
|
1978
1982
|
)
|
|
1979
1983
|
|
|
1980
1984
|
gamedays = gamedays.assign(
|
|
@@ -1987,8 +1991,10 @@ def scrape_espn_ids_single_game(game_date, home_team, away_team):
|
|
|
1987
1991
|
np.where(gamedays.home_team=='BLACKHAWKS', 'CHI',
|
|
1988
1992
|
np.where(gamedays.home_team=='AVALANCHE', 'COL',
|
|
1989
1993
|
np.where(gamedays.home_team=='BLUE', 'CBJ',
|
|
1994
|
+
np.where(gamedays.home_team=='JACKETS', 'CBJ',
|
|
1990
1995
|
np.where(gamedays.home_team=='STARS', 'DAL',
|
|
1991
1996
|
np.where(gamedays.home_team=='RED', 'DET',
|
|
1997
|
+
np.where(gamedays.home_team=='WINGS', 'DET',
|
|
1992
1998
|
np.where(gamedays.home_team=='OILERS', 'EDM',
|
|
1993
1999
|
np.where(gamedays.home_team=='PANTHERS', 'FLA',
|
|
1994
2000
|
np.where(gamedays.home_team=='KINGS', 'LAK',
|
|
@@ -2006,11 +2012,13 @@ def scrape_espn_ids_single_game(game_date, home_team, away_team):
|
|
|
2006
2012
|
np.where(gamedays.home_team=='BLUES', 'STL',
|
|
2007
2013
|
np.where(gamedays.home_team=='LIGHTNING', 'TBL',
|
|
2008
2014
|
np.where(gamedays.home_team=='MAPLE', 'TOR',
|
|
2015
|
+
np.where(gamedays.home_team=='LEAFS', 'TOR',
|
|
2009
2016
|
np.where(gamedays.home_team=='CANUCKS', 'VAN',
|
|
2010
2017
|
np.where(gamedays.home_team=='GOLDEN', 'VGK',
|
|
2018
|
+
np.where(gamedays.home_team=='KNIGHTS', 'VGK',
|
|
2011
2019
|
np.where(gamedays.home_team=='CAPITALS', 'WSH',
|
|
2012
2020
|
np.where(gamedays.home_team=='JETS', 'WPG', 'mistake'
|
|
2013
|
-
))))))))))))))))))))))))))))))))
|
|
2021
|
+
))))))))))))))))))))))))))))))))))))
|
|
2014
2022
|
)
|
|
2015
2023
|
|
|
2016
2024
|
gamedays = gamedays[(gamedays.game_date==this_date) & (gamedays.home_team==home_team) & (gamedays.away_team==away_team)]
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
TopDownHockey_Scraper/TopDownHockey_EliteProspects_Scraper.py,sha256=KyQjVTUKLDlnwJb9Sdm6jUaCh6ZxJoq2kEXBHFb1PcM,45374
|
|
2
|
+
TopDownHockey_Scraper/TopDownHockey_NHL_Scraper.py,sha256=vumUGPWrtHOTWltSwKZCJNgKzum9UKr_xh7xX0E9_Fo,153213
|
|
3
|
+
TopDownHockey_Scraper-3.2.8.dist-info/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
|
|
4
|
+
TopDownHockey_Scraper-3.2.8.dist-info/METADATA,sha256=ngmt5EJasFMsJyNmTR7iOSK_2VBk_7bY0l3eefOf1zk,5462
|
|
5
|
+
TopDownHockey_Scraper-3.2.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
6
|
+
TopDownHockey_Scraper-3.2.8.dist-info/top_level.txt,sha256=PBd96GLGFq97ZDLd7_4ZCx8_ZFr_wdWKs5SIpGl5xCs,22
|
|
7
|
+
TopDownHockey_Scraper-3.2.8.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
TopDownHockey_Scraper/TopDownHockey_EliteProspects_Scraper.py,sha256=-EPVHQc06W8OcpVoTQvpUH40sjLj9Nwsv1-y3ANrOiQ,45380
|
|
2
|
-
TopDownHockey_Scraper/TopDownHockey_NHL_Scraper.py,sha256=oSYm6Bbk8A_Rp95_wjTqALTQFnNiGalbsXU_PH-DfOE,152677
|
|
3
|
-
TopDownHockey_Scraper-3.2.6.dist-info/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
|
|
4
|
-
TopDownHockey_Scraper-3.2.6.dist-info/METADATA,sha256=kgrqvB4DczkPtD8XMmTK6T8P_bHUThl21oizPGdDlDM,5462
|
|
5
|
-
TopDownHockey_Scraper-3.2.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
6
|
-
TopDownHockey_Scraper-3.2.6.dist-info/top_level.txt,sha256=PBd96GLGFq97ZDLd7_4ZCx8_ZFr_wdWKs5SIpGl5xCs,22
|
|
7
|
-
TopDownHockey_Scraper-3.2.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{TopDownHockey_Scraper-3.2.6.dist-info → TopDownHockey_Scraper-3.2.8.dist-info}/top_level.txt
RENAMED
|
File without changes
|