Skip to content

Commit

Permalink
Fixed a typo preventing scrape of wallstream
Browse files Browse the repository at this point in the history
  • Loading branch information
bkowshik committed Sep 15, 2024
1 parent db49489 commit c47c1ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 22 deletions.
10 changes: 9 additions & 1 deletion isl_2024/scrape_wallstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/03_scrape_wallstream.ipynb.

# %% auto 0
__all__ = ['parent_dir', 'log_dir', 'data_dir', 'fetch_wallstream']
__all__ = ['parent_dir', 'log_dir', 'data_dir', 'match_ids', 'fetch_wallstream']

# %% ../nbs/03_scrape_wallstream.ipynb 2
import warnings
Expand Down Expand Up @@ -54,3 +54,11 @@ def fetch_wallstream(match_id):
f.write(response.text + "\n")
else:
logging.error('API request failed. Status code: {}'.format(response.status_code))

# %% ../nbs/03_scrape_wallstream.ipynb 7
# Fetch IDs of live matches using the matches summary.
match_ids = get_live_matches()
logging.info('Live matches: {} [{}]'.format(len(match_ids), ', '.join(match_ids)))

for match_id in match_ids:
fetch_wallstream(match_id)
22 changes: 1 addition & 21 deletions nbs/03_scrape_wallstream.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -109,33 +109,13 @@
" logging.error('API request failed. Status code: {}'.format(response.status_code))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['66797']"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"get_live_matches()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#! export\n",
"#| export\n",
"\n",
"# Fetch IDs of live matches using the matches summary.\n",
"match_ids = get_live_matches()\n",
Expand Down

0 comments on commit c47c1ad

Please sign in to comment.