Skip to content

Conversation

@Stepbus
Copy link
Collaborator

@Stepbus Stepbus commented Dec 8, 2025

No description provided.

@Stepbus Stepbus requested a review from vlad-stack December 8, 2025 08:24
See: https://app.outscraper.com/api-docs#tag/Requests/paths/~1requests~1{requestId}/get
'''
response = requests.get(f'{api_url}/requests/{request_id}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not using api_request here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added api_request method

except requests.RequestException:
continue

if 500 <= response.status_code < 600:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure we need it to continue for example when timeout? (questions to discuss)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added ConnectionError, SSLError only


def api_request(self, method: str, path: str, *, wait_async: bool, async_request: bool, use_handle_response: bool, **kwargs) -> Union[
requests.Response, list, dict]:
for attempt in range(self._max_retries):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why attempts? what if it will create two API tasks if the first request timed out?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed additional attempts

setup(
name='outscraper',
version='5.10.0',
version='6.0.0',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants