Skip to content

Commit

Permalink
Fix/ensure body response (#3)
Browse files Browse the repository at this point in the history
* Update boduy

* bump 0.3.1
  • Loading branch information
mariotaddeucci authored Feb 10, 2025
1 parent 604d37f commit 6ce2383
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/whiscraper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

__all__ = ["BrowserConfig", "browser", "get_page", "BrowserManager"]

__version__ = "0.3.0"
__version__ = "0.3.1"
2 changes: 1 addition & 1 deletion src/whiscraper/browser/tools/request_interceptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async def take(self, total: int, include_body: bool = True, timeout: float = 10,

for i in range(body_collect_timeout):
response_body: Tuple[str, bool] | None = await self._tab.send(cdp_command)
if response_body is not None:
if response_body is not None and response_body[0].strip():
break
elif i < body_collect_timeout - 1:
await asyncio.sleep(1)
Expand Down

0 comments on commit 6ce2383

Please sign in to comment.