-
Notifications
You must be signed in to change notification settings - Fork 21
Rd 217 #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
outscraper/transport.py
Outdated
| See: https://app.outscraper.com/api-docs#tag/Requests/paths/~1requests~1{requestId}/get | ||
| ''' | ||
| response = requests.get(f'{api_url}/requests/{request_id}') |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added api_request method
outscraper/transport.py
Outdated
| except requests.RequestException: | ||
| continue | ||
|
|
||
| if 500 <= response.status_code < 600: |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added ConnectionError, SSLError only
outscraper/transport.py
Outdated
|
|
||
| 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): |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
No description provided.