Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please Add Pagination Support for Reverse Image Search #253

Open
iJarmin opened this issue Jan 27, 2025 · 2 comments
Open

Please Add Pagination Support for Reverse Image Search #253

iJarmin opened this issue Jan 27, 2025 · 2 comments
Labels

Comments

@iJarmin
Copy link

iJarmin commented Jan 27, 2025

Description:
I would like to suggest adding support for pagination in the BaiDu reverse image search API client. Currently, the search results only return the first page of results, and there is no mechanism to handle pagination to retrieve subsequent pages of results.

Problem:
• When performing a reverse image search, the results are usually paginated.
• The current implementation only processes the first page of results.
• If the number of results is large, subsequent pages of results are not retrieved, which limits the search coverage.

Solution:
• Pagination Handling: Add logic to automatically handle pagination by detecting the presence of a next page URL (e.g., in cardData).
• Recursive Requesting: Once the first page is fetched, the client should check for a “next” page link (e.g., firstUrl) and continue to request the next page until no further pages are available.
• Combining Results: All pages should be combined into a single response, providing the complete set of results.

@NekoAria
Copy link
Collaborator

NekoAria commented Feb 6, 2025

First, I discovered that this module has been non-functional for some time, possibly quite a while. The lack of reported issues until now suggests limited usage, as I only noticed the dysfunction after testing the demo code following your issue submission.

Secondly, the primary developers of this project rarely utilize this engine and have concerns about its reliability due to inconsistent search results.

Lastly, while I appreciate your suggested modifications, they may not be practical in this context. The module currently requires multiple requests to obtain final search results, making it vulnerable to failures if any single request fails. Adding additional requests for pagination would likely further reduce the module's reliability.

Copy link
Contributor

github-actions bot commented Mar 9, 2025

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants