Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,10 +30,15 @@ def create_search_url_youtube(artist_song):
|
|
30 |
base_url = "https://www.youtube.com/results?search_query="
|
31 |
return base_url + artist_song.replace(' ', '+').replace('β', '%E2%80%93').replace('&', 'and')
|
32 |
|
33 |
-
# Function to create a search URL for Chords
|
34 |
def create_search_url_chords(artist_song):
|
35 |
base_url = "https://www.ultimate-guitar.com/search.php?search_type=title&value="
|
36 |
return base_url + artist_song.replace(' ', '+').replace('β', '%E2%80%93').replace('&', 'and')
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
# Parsing the data
|
39 |
data = parse_data("data.txt")
|
@@ -42,22 +47,24 @@ data = parse_data("data.txt")
|
|
42 |
st.set_page_config(page_title="MTV VMAs - 2023 Awards Wikipedia and Youtube", layout="wide")
|
43 |
|
44 |
# Main title
|
45 |
-
st.title("π Video Awards
|
46 |
|
47 |
# Displaying data
|
48 |
for category, nominees in data.items():
|
49 |
st.header(f"{category} πΆ")
|
50 |
with st.expander("View Nominees"):
|
51 |
for nominee in nominees:
|
52 |
-
col1, col2, col3, col4 = st.columns([4, 1, 1, 1])
|
53 |
with col1:
|
54 |
st.markdown(f"* {nominee}")
|
55 |
with col2:
|
56 |
st.markdown(f"[Wikipedia]({create_search_url_wikipedia(nominee)})")
|
57 |
with col3:
|
58 |
st.markdown(f"[YouTube]({create_search_url_youtube(nominee)})")
|
59 |
-
with
|
60 |
st.markdown(f"[Chords]({create_search_url_chords(nominee)})")
|
|
|
|
|
61 |
|
62 |
# Footer
|
63 |
st.caption("Source: MTV Video Music Awards 2023")
|
|
|
30 |
base_url = "https://www.youtube.com/results?search_query="
|
31 |
return base_url + artist_song.replace(' ', '+').replace('β', '%E2%80%93').replace('&', 'and')
|
32 |
|
33 |
+
# Function to create a search URL for Chords:
|
34 |
def create_search_url_chords(artist_song):
|
35 |
base_url = "https://www.ultimate-guitar.com/search.php?search_type=title&value="
|
36 |
return base_url + artist_song.replace(' ', '+').replace('β', '%E2%80%93').replace('&', 'and')
|
37 |
+
|
38 |
+
# Function to create a search URL for Lyrics:
|
39 |
+
def create_search_url_lyrics(artist_song):
|
40 |
+
base_url = "https://www.google.com/search?q="
|
41 |
+
return base_url + artist_song.replace(' ', '+').replace('β', '%E2%80%93').replace('&', 'and') + lyrics
|
42 |
|
43 |
# Parsing the data
|
44 |
data = parse_data("data.txt")
|
|
|
47 |
st.set_page_config(page_title="MTV VMAs - 2023 Awards Wikipedia and Youtube", layout="wide")
|
48 |
|
49 |
# Main title
|
50 |
+
st.title("π Video Awards 2023 - Wikipedia, Youtube, Chords, Lyrics")
|
51 |
|
52 |
# Displaying data
|
53 |
for category, nominees in data.items():
|
54 |
st.header(f"{category} πΆ")
|
55 |
with st.expander("View Nominees"):
|
56 |
for nominee in nominees:
|
57 |
+
col1, col2, col3, col4, col5 = st.columns([4, 1, 1, 1, 1])
|
58 |
with col1:
|
59 |
st.markdown(f"* {nominee}")
|
60 |
with col2:
|
61 |
st.markdown(f"[Wikipedia]({create_search_url_wikipedia(nominee)})")
|
62 |
with col3:
|
63 |
st.markdown(f"[YouTube]({create_search_url_youtube(nominee)})")
|
64 |
+
with col4:
|
65 |
st.markdown(f"[Chords]({create_search_url_chords(nominee)})")
|
66 |
+
with col5:
|
67 |
+
st.markdown(f"[Lyrics]({create_search_url_lyrics(nominee)})")
|
68 |
|
69 |
# Footer
|
70 |
st.caption("Source: MTV Video Music Awards 2023")
|