Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ def test_convert_cookies():
assert cookie_dict.get("a1") == "x000101360"


def test_convert_str_cookie_to_dict_preserves_equals_in_cookie_values():
cookie_dict = utils.convert_str_cookie_to_dict("session=eyJhbGciOiJIUzI1NiJ9==; theme=dark")

assert cookie_dict == {"session": "eyJhbGciOiJIUzI1NiJ9==", "theme": "dark"}


@pytest.mark.asyncio
async def test_convert_browser_context_cookies_uses_url_filter():
browser_context = AsyncMock()
Expand Down
2 changes: 1 addition & 1 deletion tools/crawler_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def convert_str_cookie_to_dict(cookie_str: str) -> Dict:
cookie = cookie.strip()
if not cookie:
continue
cookie_list = cookie.split("=")
cookie_list = cookie.split("=", 1)
if len(cookie_list) != 2:
continue
cookie_value = cookie_list[1]
Expand Down