#8 Navigation doesn't work

Отворени
отворен преди 8 години от jorgesumle · 3 коментара

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?
Jorge Maldonado Ventura коментира преди 8 години
Притежател
https://github.com/jarun/ddgr/issues/3
Jorge Maldonado Ventura коментира преди 7 години
Притежател
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.
Jorge Maldonado Ventura коментира преди 7 години
Притежател

Now navigation works up to result 30: eeecd17d2a.

Now navigation works up to result 30: https://notabug.org/Ducker/ducker/commit/eeecd17d2aa1eaf89872c53447af09678cc6ab2a.
Впишете се за да се присъедините към разговора.
Няма етап
Няма изпълнител
1 участника
Зареждане...
Отказ
Запис
Все още няма съдържание.