[view.qt] enhancement: displaying the screenshot download progress

This commit is contained in:
Vinicius Moreira
2023-12-13 09:52:46 -03:00
parent 3b7b22c9c7
commit da5cbdce6f
3 changed files with 53 additions and 28 deletions

View File

@@ -19,14 +19,15 @@ class HttpClient:
self.sleep = sleep
self.logger = logger
def get(self, url: str, params: dict = None, headers: dict = None, allow_redirects: bool = True, ignore_ssl: bool = False, single_call: bool = False, session: bool = True) -> Optional[requests.Response]:
def get(self, url: str, params: dict = None, headers: dict = None, allow_redirects: bool = True, ignore_ssl: bool = False, single_call: bool = False,
session: bool = True, stream: bool = False) -> Optional[requests.Response]:
cur_attempts = 1
while cur_attempts <= self.max_attempts:
cur_attempts += 1
try:
args = {'timeout': self.timeout, 'allow_redirects': allow_redirects}
args = {'timeout': self.timeout, 'allow_redirects': allow_redirects, 'stream': stream}
if params:
args['params'] = params