diff --git a/ofscraper/utils/download.py b/ofscraper/utils/download.py index 4dd869877..d1dd09cb4 100644 --- a/ofscraper/utils/download.py +++ b/ofscraper/utils/download.py @@ -416,7 +416,7 @@ async def inner(c,ele,path,username,model_id,progress,total): try: await fileobject.close() except Exception as E: - raise E + None total=int(data.get("content-length")) if data else None @@ -615,7 +615,7 @@ async def inner(item,c,ele,progress): try: await fileobject.close() except Exception as E: - raise E + None return await inner(item,c,ele,progress) diff --git a/ofscraper/utils/downloadbatch.py b/ofscraper/utils/downloadbatch.py index 3c0a601b8..42ea00cf8 100644 --- a/ofscraper/utils/downloadbatch.py +++ b/ofscraper/utils/downloadbatch.py @@ -595,7 +595,7 @@ async def inner(c,ele,path,username,model_id,total): try: await fileobject.close() except Exception as E: - raise E + None total=int(data.get("content-length")) if data else None return await inner(c,ele,path,username,model_id,total) @@ -790,7 +790,7 @@ async def inner(item,c,ele): try: await fileobject.close() except Exception as E: - raise E + raise None return await inner(item,c,ele)