mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[view.qt] enhancement: displaying the screenshot download progress
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user