Skip to content

Commit

Permalink
Merge pull request #237 from Peloxerat/patch-1
Browse files Browse the repository at this point in the history
fix copyseeker request logic and network typeerror
  • Loading branch information
NekoAria authored Dec 15, 2024
2 parents f41dd25 + e16dcd6 commit dae51ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions PicImageSearch/engines/copyseeker.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,13 @@ async def search(
return CopyseekerResponse({}, "")

data = {"discoveryId": discovery_id, "hasBlocker": False}

headers = {
"Origin": "https://copyseeker.net",
"Referer": "https://copyseeker.net/"
}

resp = await self._make_request(
method="post", endpoint="OnProvideDiscovery", json=data
method="post", endpoint="OnProvideDiscovery", json=data, headers=headers
)
resp_json = json_loads(resp.text)
return CopyseekerResponse(resp_json, resp.url)
2 changes: 1 addition & 1 deletion PicImageSearch/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(
cookies=self.cookies,
verify=verify_ssl,
http2=http2,
proxies=proxies,
proxy=proxies,
timeout=timeout,
follow_redirects=True,
)
Expand Down

0 comments on commit dae51ce

Please sign in to comment.