Skip to content

Commit

Permalink
make min speed 1024
Browse files Browse the repository at this point in the history
  • Loading branch information
datawhores committed Aug 7, 2024
1 parent 81b01ad commit ce8fa20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ofscraper/classes/sessionmanager/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ async def wrapper(*args, **kwargs):

return wrapper
async def get_token(self,size):
if settings.get_download_limit()==0:
return
await self.leaky_bucket.acquire(size)


Expand Down
3 changes: 2 additions & 1 deletion ofscraper/utils/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,5 @@ def get_max_length(mediatype=None):
return config_data.get_max_length(mediatype=mediatype)

def get_download_limit():
return read_args.retriveArgs().download_limit or config_data.get_download_limit()
out= read_args.retriveArgs().download_limit or config_data.get_download_limit()
return max(out,1024) if out else out

0 comments on commit ce8fa20

Please sign in to comment.