[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 flask
redis redis
requests requests
rq
selenium==3.14.1 selenium==3.14.1
selenium-requests selenium-requests
urllib3==1.26.2 urllib3==1.26.2

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

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

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

@ -21,7 +21,7 @@ def download_file(url, output):
def process_download(artist): def process_download(artist):
artist = artist.title() artist = artist.title()
# Initialize a new browser object to go collect the data we need # 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 url = QUERY_URL + artist
browser.maximize_window() browser.maximize_window()
browser.implicitly_wait(1) browser.implicitly_wait(1)
@ -77,7 +77,7 @@ def process_download(artist):
album_title = album.find('div', {'id': 'card-title'}) album_title = album.find('div', {'id': 'card-title'})
if album_title and hasattr(album_title, 'text'): 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) albums_data_list.append(album_data)

Loading…
Cancel
Save