#8 Navigation doesn't work

Open
opened 7 years ago by jorgesumle · 3 comments

We can't go to next or previous result page.

There should be a way to specify DuckDuckGo we want to go to the second (third and so on) results page building a URL. How can we do that?

We can't go to next or previous result page. There should be a way to specify DuckDuckGo we want to go to the second (third and so on) results page building a URL. How can we do that?
https://github.com/jarun/ddgr/issues/3
from urllib.parse import urlencode
from urllib.request import Request, urlopen

url = 'https://duckduckgo.com/html'
post_fields = {'q': 'hola', 's': '30', 'nextParams': '', 'v': 'l', 'o': 'json', 'dc': '31', 'api': '/d.js', 'kl': 'us-en'}

request = Request(url, urlencode(post_fields).encode())
json = urlopen(request).read().decode()
print(json)

Here is some code to make POST requests to DuckDuckGo. I'm not sure how to make it work as I want though. I'm not sure what 'dc' and 's' mean.

``` from urllib.parse import urlencode from urllib.request import Request, urlopen url = 'https://duckduckgo.com/html' post_fields = {'q': 'hola', 's': '30', 'nextParams': '', 'v': 'l', 'o': 'json', 'dc': '31', 'api': '/d.js', 'kl': 'us-en'} request = Request(url, urlencode(post_fields).encode()) json = urlopen(request).read().decode() print(json) ``` Here is some code to make POST requests to DuckDuckGo. I'm not sure how to make it work as I want though. I'm not sure what 'dc' and 's' mean.

Now navigation works up to result 30: eeecd17d2a.

Now navigation works up to result 30: https://notabug.org/Ducker/ducker/commit/eeecd17d2aa1eaf89872c53447af09678cc6ab2a.
Sign in to join this conversation.
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.