mirror of
https://github.com/jointakahe/takahe.git
synced 2025-06-05 02:08:49 +00:00
Fix not fetching images properlly when url is redirected (#526)
This commit is contained in:
parent
9aff13118a
commit
d9cab99859
1 changed files with 3 additions and 1 deletions
|
@ -71,7 +71,9 @@ async def get_remote_file(
|
||||||
}
|
}
|
||||||
|
|
||||||
async with httpx.AsyncClient(headers=headers) as client:
|
async with httpx.AsyncClient(headers=headers) as client:
|
||||||
async with client.stream("GET", url, timeout=timeout) as stream:
|
async with client.stream(
|
||||||
|
"GET", url, timeout=timeout, follow_redirects=True
|
||||||
|
) as stream:
|
||||||
allow_download = max_size is None
|
allow_download = max_size is None
|
||||||
if max_size:
|
if max_size:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue