Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -23,12 +23,12 @@ def parse_data(filename):
|
|
23 |
# Function to create a search URL for Wikipedia:
|
24 |
def create_search_url_wikipedia(artist_song):
|
25 |
base_url = "https://www.wikipedia.org/search-redirect.php?family=wikipedia&language=en&search="
|
26 |
-
return base_url + artist_song.replace(' ', '+').replace('β', '%E2%80%93')
|
27 |
|
28 |
# Function to create a search URL for YouTube:
|
29 |
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')
|
32 |
|
33 |
# Parsing the data
|
34 |
data = parse_data("data.txt")
|
|
|
23 |
# Function to create a search URL for Wikipedia:
|
24 |
def create_search_url_wikipedia(artist_song):
|
25 |
base_url = "https://www.wikipedia.org/search-redirect.php?family=wikipedia&language=en&search="
|
26 |
+
return base_url + artist_song.replace(' ', '+').replace('β', '%E2%80%93').replace('&', 'and')
|
27 |
|
28 |
# Function to create a search URL for YouTube:
|
29 |
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 |
# Parsing the data
|
34 |
data = parse_data("data.txt")
|