[FIX] stripe / from title as to not violate folder naming conventions

refactor_total
Brett Spaulding 3 years ago
parent 56edc0174b
commit b72d2f88e7

@ -2,6 +2,7 @@ bs4
flask
redis
requests
rq
selenium==3.14.1
selenium-requests
urllib3==1.26.2

@ -15,7 +15,7 @@ body {
text-align: center;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
transform: translate(-50%, -50%) !important;
}
.card {

@ -1,15 +1,16 @@
$('#download_btn').on('click', () => {
console.log('Clicked Download!');
let artist = $('#search_bar').val();
// Prevent
$('#search_bar').val('');
console.log(artist);
if (artist) {
$("#loader-wrapper").fadeIn(300);
$.ajax({
url: `/api/v1/get/${artist}`,
}).done(function () {
$('#search_bar').val('');
}).done(function (res) {
console.log('---');
console.log(res);
console.log('---');
$("#loader-wrapper").fadeOut(700);
});
} else {

@ -18,8 +18,8 @@
</head>
<body>
<div id="loader-wrapper" class="bg-white position-fixed z-3 w-100 h-100 text-center">
<div class="" role="status" style="position: fixed; top: 50%;">
<i class="la la-4x la-compact-disc icn-spinner centered"></i>
<div class="centered" role="status" style="position: fixed; top: 50%;">
<i class="la la-4x la-compact-disc icn-spinner"></i>
</div>
</div>

@ -21,7 +21,7 @@ def download_file(url, output):
def process_download(artist):
artist = artist.title()
# Initialize a new browser object to go collect the data we need
browser = new_browser(headless=False)
browser = new_browser(headless=True)
url = QUERY_URL + artist
browser.maximize_window()
browser.implicitly_wait(1)
@ -77,7 +77,7 @@ def process_download(artist):
album_title = album.find('div', {'id': 'card-title'})
if album_title and hasattr(album_title, 'text'):
album_data.update({'album': album_title.text.replace('\n', '')})
album_data.update({'album': album_title.text.replace('\n', '').replace('/', '-')})
albums_data_list.append(album_data)

Loading…
Cancel
Save