Skip to content

Commit

Permalink
chore(download): add todo notes
Browse files Browse the repository at this point in the history
  • Loading branch information
hayden-fr committed Nov 7, 2024
1 parent f22fbd4 commit ae518b5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions py/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,13 @@ async def update_progress():
# If no token is carried, it will be redirected to the login page.
content_type = response.headers.get("content-type")
if content_type and content_type.startswith("text/html"):
# TODO More checks
# In addition to requiring login to download, there may be other restrictions.
# The currently one situation is early access??? issues#43
# Due to the lack of test data, let’s put it aside for now.
# If it cannot be downloaded, a redirect will definitely occur.
# Maybe consider getting the redirect url from response.history to make a judgment.
# Here we also need to consider how different websites are processed.
raise RuntimeError(
f"{task_content.fullname} needs to be logged in to download. Please set the API-Key first."
)
Expand Down

0 comments on commit ae518b5

Please sign in to comment.