python JSON API duckduckgo search engine 使用duckduckgo API 尝试搜索引擎

The duckduckgo.com's search engine is very neat to use.

Acutally it has many things to do with other things since its API is also very neat. 

We can find many API which are free to use on different platforms. Here we got one for JavaScript on github. "https://github.com/devnulled/duckduckgo-api"

Here we can get official API of it.

https://api.duckduckgo.com/api

https://duckduckgo.com/api

 

Now we can use duckduckgo's API to test other things as it refers.

"

To consume it yourself, you can use one of the language libraries listed below or simply add '&format=json' (or xml if you have a death wish) onto any query URL in the api subdomain, e.g. 
http://api.duckduckgo.com/?q=DuckDuckGo&format=json

"

Now we just choose python since it has very neat JSON lib and parser.

You will need to have a look of my pervious blog which could be helpful to understand how to parse JSON within python.

    http://www.cnblogs.com/spaceship9/p/3153952.html

 

I now just want to get useful information from duckduckgo to be mine.

I found an interesting thing here: http://duckduckhack.com/ 

Open-source DuckDuckGo

Now you can hack your search engine.

 

 

Also we use this :

  • For !bang commands, the redirect will happen at the HTTP level (since that is fastest), but it will also be returned in the content (for parsing). If you don't want the redirect to happen in the HTTP header, use the no_redirect flag.

  https://duckduckgo.com/bang.html 

 ______To Be continued 00:51 10th Nov, I am sleepy and tired today. gonna have an important visite to a studio in the morning.

 

 

posted @   spaceship9  阅读(1186)  评论(1编辑  收藏  举报
编辑推荐:
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
点击右上角即可分享
微信分享提示