nesticot commited on
Commit
dc210c6
·
verified ·
1 Parent(s): 26ed56c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -186,12 +186,13 @@ with st.container():
186
  try:
187
  # Update the video URL based on the selected row
188
  selected_row_index = int(grid_response['selected_rows'].index.values[0])
189
- a = requests.get(f'https://baseballsavant.mlb.com/sporty-videos?playId={df_merge["play_id"].values[selected_row_index]}')
190
- soup = BeautifulSoup(a.content, 'lxml')
191
- video_url = str(soup).split('<source src="')[1].split('" ')[0]
 
192
  # Share the video through Streamlit
193
  #st.video(video_url)
194
- st.markdown( f'#### [Link to Video]({video_url})')
195
 
196
  #st.write("Select Row to Display Video")
197
 
 
186
  try:
187
  # Update the video URL based on the selected row
188
  selected_row_index = int(grid_response['selected_rows'].index.values[0])
189
+ play_link = f'https://baseballsavant.mlb.com/sporty-videos?playId={df_merge["play_id"].values[selected_row_index]}'
190
+ #a = requests.get(f'https://baseballsavant.mlb.com/sporty-videos?playId={df_merge["play_id"].values[selected_row_index]}')
191
+ #soup = BeautifulSoup(a.content, 'lxml')
192
+ #video_url = str(soup).split('<source src="')[1].split('" ')[0]
193
  # Share the video through Streamlit
194
  #st.video(video_url)
195
+ st.markdown( f'#### [Link to Video]({play_link})')
196
 
197
  #st.write("Select Row to Display Video")
198