Skip to content

Commit db18ef3

Browse files
author
Ivy Bowman
committed
Final prep for version 1.0
1 parent 0d43f56 commit db18ef3

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

autobooks/AutoBooks.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ def login(library):
130130
box = login_session.get(f'https://{library["subdomain"]}.overdrive.com/account/ozone/sign-in?forward=%2F')
131131
# logger.success('Fetched login page. Status Code: {}', box.status_code)
132132
form_list = parse_form(box, "loginForms")['forms']
133-
print(form_list)
134133
login_form = query_login_form(form_list, library['select_box'])
135134
sleep(0.5)
136135
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):
158157
odm_list = []
159158
book_count = 0
160159
if len(book_list) == 0:
161-
logger.warning("Can't find books skipped library: {}", name)
160+
logger.info("Can't find any new audiobooks skipped library: {}", name)
162161
error_count += 1
163162
return df_out
164163
for book in book_list:
@@ -176,7 +175,7 @@ def download(df, session, base_url, name, book_list):
176175
f.write(odm.content)
177176
odm_list.append(odm_filename)
178177
book_count += 1
179-
print(odm_filename)
178+
# print(odm_filename)
180179
# Save book info to dataframe
181180
df_book = pd.DataFrame([[name, book['id'], book['title'], odm_filename]],
182181
columns=['ils_name', 'book_id', 'book_title', 'book_odm'])
@@ -239,7 +238,7 @@ def run():
239238
logger.warning("Can't find books skipped library: {}", lib_conf['name'])
240239
error_count += 1
241240
session.close()
242-
logger.info("AutoBooksWeb Complete")
241+
logger.info("Download Complete")
243242

244243
# Process log file for Cronitor.
245244
web_log = process_logfile(LOG_FILENAME, terms=("web", "ERROR"))
@@ -251,7 +250,7 @@ def run():
251250
if len(web_odm_list) != 0:
252251
logger.info("Started Downloading Books")
253252
monitor.ping(state='run',
254-
message=f"Started Downloading Books \n"
253+
message=f"Started Processing Books \n"
255254
f"logfile: {LOG_FILENAME}\n out_dir: {config['out_folder']} \n"
256255
f"odm_list:{web_odm_list}")
257256
good_odm_list, bad_odm_list = process(web_odm_list)

autobooks_template.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cronitor_apikey =
55
discord_bot_token =
66

77
# Debug Settings
8-
test_args = False
8+
odmpy_test_args = False
99
test_run = False
1010

1111
# Folder to output the generated m4b files to.

0 commit comments

Comments
 (0)