From db18ef3388ca835a7eaeb6b10f542c79933c6c0d Mon Sep 17 00:00:00 2001 From: Ivy Bowman Date: Mon, 22 Aug 2022 16:45:33 -0400 Subject: [PATCH] Final prep for version 1.0 --- autobooks/AutoBooks.py | 9 ++++----- autobooks_template.ini | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/autobooks/AutoBooks.py b/autobooks/AutoBooks.py index f98421a..966acbf 100644 --- a/autobooks/AutoBooks.py +++ b/autobooks/AutoBooks.py @@ -130,7 +130,6 @@ def login(library): box = login_session.get(f'https://{library["subdomain"]}.overdrive.com/account/ozone/sign-in?forward=%2F') # logger.success('Fetched login page. Status Code: {}', box.status_code) form_list = parse_form(box, "loginForms")['forms'] - print(form_list) login_form = query_login_form(form_list, library['select_box']) sleep(0.5) auth = login_session.post(f'https://{library["subdomain"]}.overdrive.com/account/signInOzone', @@ -158,7 +157,7 @@ def download(df, session, base_url, name, book_list): odm_list = [] book_count = 0 if len(book_list) == 0: - logger.warning("Can't find books skipped library: {}", name) + logger.info("Can't find any new audiobooks skipped library: {}", name) error_count += 1 return df_out for book in book_list: @@ -176,7 +175,7 @@ def download(df, session, base_url, name, book_list): f.write(odm.content) odm_list.append(odm_filename) book_count += 1 - print(odm_filename) + # print(odm_filename) # Save book info to dataframe df_book = pd.DataFrame([[name, book['id'], book['title'], odm_filename]], columns=['ils_name', 'book_id', 'book_title', 'book_odm']) @@ -239,7 +238,7 @@ def run(): logger.warning("Can't find books skipped library: {}", lib_conf['name']) error_count += 1 session.close() - logger.info("AutoBooksWeb Complete") + logger.info("Download Complete") # Process log file for Cronitor. web_log = process_logfile(LOG_FILENAME, terms=("web", "ERROR")) @@ -251,7 +250,7 @@ def run(): if len(web_odm_list) != 0: logger.info("Started Downloading Books") monitor.ping(state='run', - message=f"Started Downloading Books \n" + message=f"Started Processing Books \n" f"logfile: {LOG_FILENAME}\n out_dir: {config['out_folder']} \n" f"odm_list:{web_odm_list}") good_odm_list, bad_odm_list = process(web_odm_list) diff --git a/autobooks_template.ini b/autobooks_template.ini index 8bf6bc8..ddb4f3e 100644 --- a/autobooks_template.ini +++ b/autobooks_template.ini @@ -5,7 +5,7 @@ cronitor_apikey = discord_bot_token = # Debug Settings -test_args = False +odmpy_test_args = False test_run = False # Folder to output the generated m4b files to.