Skip to content

Conversation

@edgeinfinity1
Copy link

Quite a rough one, using httpx instead of requests.
Comes together with a simple example.

@Nv7-GitHub
Copy link
Owner

Is this a breaking change or is this compatible with all older code too?

@edgeinfinity1
Copy link
Author

Is this a breaking change or is this compatible with all older code too?

This breaks the original searching function.
For a fully compatible version, I can separate the async part into a new function. Or you can change it in this PR too, it's simple.

@edgeinfinity1
Copy link
Author

Progress: Now added compatibility to sync search function.
Async searching now named asearch.
Async searching supports socks5.

@Nv7-GitHub
Copy link
Owner

Sorry for the late response! Would you mind putting it in a separate file just to make the code a little cleaner?

@edgeinfinity1
Copy link
Author

Sorry for the late response! Would you mind putting it in a separate file just to make the code a little cleaner?

I'd like to but the main structure was set in the init file. It should be a separate file itself so I can make a symmetric one.
Could you sort that part out first?

@Nv7-GitHub
Copy link
Owner

Sorry about the long delay! Couldn't you add from .<filename> import asearch into __init__.py and separate it out like that? What do you mean by the main structure?

@edgeinfinity1
Copy link
Author

Optimized as requested.

@edgeinfinity1
Copy link
Author

Update: now we recover from the Lynx drop.
you can also install this branch by pip install mi-googlesearch-python.

@xiuxiu
Copy link

xiuxiu commented Sep 19, 2025

can I just update the UA to make the search function working without changing to async method?

@edgeinfinity1
Copy link
Author

can I just update the UA to make the search function working without changing to async method?

Sure you can, and this branch supports the original sync method too.

@Nv7-GitHub
Copy link
Owner

Nv7-GitHub commented Oct 4, 2025

This UA also doesn't work now, I think implementing something like a headless browser (#117) is the best strategy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants