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

Get duck duck go fixed results #10

Closed
MeNsaaH opened this issue Sep 1, 2019 · 3 comments
Closed

Get duck duck go fixed results #10

MeNsaaH opened this issue Sep 1, 2019 · 3 comments

Comments

@MeNsaaH
Copy link
Member

MeNsaaH commented Sep 1, 2019

With other Search engines, we are able to add offsets for page numbers and number of results to return. DuckDuckGo however does not seem straight forward. We should look for the accurate way to make the requests to duckduckgo

@MeNsaaH MeNsaaH added the help wanted Extra attention is needed label Sep 1, 2019
@deven96 deven96 added the good first issue Good for newcomers label Sep 15, 2019
@ashokkumarta
Copy link
Contributor

Checked the behavior of duckduckgo page navigation.

The URL below available as both the POST and GET methods returns results based on page position.

https://duckduckgo.com/html/?q={query}&s={start}&dc={offset}&v=l&o=json&api=/d.js

with start parameter being

  • 0 for 1st page
  • 30 for 2nd page
  • 80 for 3rd page
  • 130 for 4th page
  • ... increases by 50 for each subsequent page

and offset value is one less than start value for forward navigation (this value does not influence search results, but is needed as a parameter.

Other parameters in the URL have fixed values.

URLs for a sample query string "Hello"
Page 1
Page 2
Page 3
Page 4

Checking the code to handle Page navigation for duckduckgo engine.

@MeNsaaH
Copy link
Member Author

MeNsaaH commented Oct 15, 2019

That's nice. Can you make a PR?

@ashokkumarta
Copy link
Contributor

Create PR #66.

@deven96 deven96 closed this as completed Oct 18, 2019
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

No branches or pull requests

3 participants