Update app.py
Browse files
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 |
-
|
| 190 |
-
|
| 191 |
-
|
|
|
|
| 192 |
# Share the video through Streamlit
|
| 193 |
#st.video(video_url)
|
| 194 |
-
st.markdown( f'#### [Link to Video]({
|
| 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 |
|