upbit / pixivpy

Pixiv API for Python
https://pypi.org/project/PixivPy3/#files
The Unlicense
1.78k stars 148 forks source link

refactor: update bapi.py #333

Closed nautics889 closed 7 months ago

nautics889 commented 8 months ago

Little updates in bapi.py.

My apologies for the delay.

This commit contains tiny changes of bapi.py module:

  1. Adds logger to be used across bapi.py.
  2. Adds catching of specific exceptions instead of general Exception, adds logging an according message with (log level DEBUG since most likely that logs would be useful only when troubleshooting).
  3. Using f-strings instead of string concatination (AFAIK the package support only 3.7+).

This PR does not affect behavior of the code (except adding some new log-records).


upbit commented 7 months ago

Thanks for contribution! Using logger is better than ignoring all errors as before. Merged!