Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
web : Make fetch_upload_id's error logs more helpful
Browse files Browse the repository at this point in the history
  • Loading branch information
mos9527 committed Dec 30, 2022
1 parent 7c2be2e commit 20878cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bilibili_toolman/bilisession/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,11 @@ def fetch_upload_id():
# partsize=10485760&
# meta_upos_uri=upos%3A%2F%2Ffxmeta%2Fn220728a2uy50rqfrx1kz2xenwwshgaq.txt&biz_id=786176430
#
upload_id = self._upload_id(endpoint).json()["upload_id"]
resp = self._upload_id(endpoint)
upload_id = resp.json()["upload_id"]
return config, endpoint, upload_id
except Exception as e:
self.logger.warning("第 %s 上传未成功,重试..." % i)
self.logger.warning("第 %s 上传时:%s (HTTP %s)" % (i,e,resp.status_code))
time.sleep(self.DELAY_RETRY_UPLOAD_ID)
return None, None, None

Expand Down

0 comments on commit 20878cf

Please sign in to comment.