duckduckgo / zeroclickinfo-fathead

DuckDuckGo Instant Answers based on keyword data files
https://duckduckhack.com/
Other
318 stars 365 forks source link

HTTP Status Codes: link to direct http code #193

Closed nobe4 closed 3 years ago

nobe4 commented 8 years ago

Hi, Is there a way to add a direct link to the HTTP status on the fathead ? On Wikipedia, each status has an id on the HTML element, so I think this can be as simple as adding #200 at the end of the link url.

(also, I would like to contribute, maybe even starting with this, how can I ?)

Thanks,


IA Page: http://duck.co/ia/view/httpstatus Maintainer: @duckduckgo

gsquire commented 8 years ago

Is there an existing fathead for HTTP status codes? I also want to add this to DDG as an instant answer. I tried looking through old issues but couldn't find any indication of a PR or other links. I would be happy to help write it too.

nobe4 commented 8 years ago

Yup: https://duckduckgo.com/?q=http+code+406&ia=about

As you can see on the screenshot, the 406 does not link back to the specific 406 element in the wikipedia page.

screen shot 2016-04-11 at 18 19 08
jdorweiler commented 8 years ago

@nobe4 I'm not sure if the code to generate this data still works but this is where it is https://github.com/duckduckgo/zeroclickinfo-fathead/blob/master/lib/fathead/UNCLEAN/parse_httpcode.py

You could start with that or do your own fathead from scratch if you want.

jdorweiler commented 8 years ago

Here is the section on fatheads from our docs. http://docs.duckduckhack.com/resources/fathead-overview.html

Let me know if you have any questions.

nobe4 commented 8 years ago

@jdorweiler: thanks, I'll have a look tonight. 👍