Skip to content

Commit

Permalink
tests: add test impersonate=chrome_131
Browse files Browse the repository at this point in the history
  • Loading branch information
deedy5 committed Nov 22, 2024
1 parent 0010a41 commit 5b877c1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,17 @@ def test_client_impersonate_chrome130():
assert json_data["ja4"] == "t13d1516h2_8daaf6152771_b1ff8ab2d16f"
assert json_data["akamai_hash"] == "90224459f8bf70b7d0a8797eb916dbc9"
assert json_data["peetprint_hash"] == "b8ce945a4d9a7a9b5b6132e3658fe033"


@retry()
def test_client_impersonate_chrome131():
client = primp.Client(
impersonate="chrome_131",
)
# response = client.get("https://tls.peet.ws/api/all")
response = client.get("https://tls.http.rw/api/clean")
assert response.status_code == 200
json_data = response.json()
assert json_data["ja4"] == "t13d1516h2_8daaf6152771_b1ff8ab2d16f"
assert json_data["akamai_hash"] == "90224459f8bf70b7d0a8797eb916dbc9"
assert json_data["peetprint_hash"] == "7466733991096b3f4e6c0e79b0083559"
14 changes: 14 additions & 0 deletions tests/test_defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,17 @@ def test_get_impersonate_chrome130():
assert json_data["ja4"] == "t13d1516h2_8daaf6152771_b1ff8ab2d16f"
assert json_data["akamai_hash"] == "90224459f8bf70b7d0a8797eb916dbc9"
assert json_data["peetprint_hash"] == "b8ce945a4d9a7a9b5b6132e3658fe033"


@retry()
def test_get_impersonate_chrome131():
response = primp.get(
# "https://tls.peet.ws/api/clean",
"https://tls.http.rw/api/clean",
impersonate="chrome_131",
)
assert response.status_code == 200
json_data = response.json()
assert json_data["ja4"] == "t13d1516h2_8daaf6152771_b1ff8ab2d16f"
assert json_data["akamai_hash"] == "90224459f8bf70b7d0a8797eb916dbc9"
assert json_data["peetprint_hash"] == "7466733991096b3f4e6c0e79b0083559"

0 comments on commit 5b877c1

Please sign in to comment.