Skip to content

Commit b4ef23a

Browse files
committed
Add megasearch API response example
1 parent 0a347ed commit b4ef23a

File tree

2 files changed

+32
-9
lines changed

2 files changed

+32
-9
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,37 @@ curl "http://localhost:7000/mega/search?text=golang&engines=google,bing&limit=5"
5757
curl "http://localhost:7000/mega/search?text=golang&lang=EN&site=github.com&limit=8"
5858
```
5959

60+
- API response example:
61+
62+
```json
63+
[
64+
{
65+
"rank": 1,
66+
"url": "https://en.wikipedia.org/wiki/Golden_Retriever",
67+
"title": "Golden Retriever - Wikipedia",
68+
"description": "The Golden Retriever is a Scottish breed of retriever dog of medium size. It is characterised by a gentle and affectionate nature and a striking golden coat. It is a working dog, and registration is subject to successful completion of a working trial. [2] It is commonly kept as a companion dog and is among the most frequently registered breeds in several Western countries; some may compete in ...",
69+
"ad": false,
70+
"engine": "duckduckgo"
71+
},
72+
{
73+
"rank": 2,
74+
"url": "https://www.bing.com/ck/a?!&&p=6f15ac4589858d0a104cd6f55cc8e91e8d8d6da91f905b626921f67f2323a467JmltdHM9MTc1OTE5MDQwMA&ptn=3&ver=2&hsh=4&fclid=2357c2f4-6131-68de-359f-d48c607c691d&u=a1aHR0cHM6Ly93d3cuZ29sZGVucmV0cmlldmVyZm9ydW0uY29tL3RocmVhZHMvdW5kZXJzdGFuZGluZy13aHktZ29sZGVuLXJldHJpZXZlciVFMiU4MCU5OXMtbGlmZXNwYW4taGFsdmVkLWluLXRoZS1sYXN0LTM1LXllYXJzLjM1NzMyMi8&ntb=1",
75+
"title": "Golden Retriever Dog Forums\nhttps://www.goldenretrieverforum.com › threads › understanding-why-g…",
76+
"description": "Oct 20, 2024 · Back in the 1970s, Golden Retrievers routinely lived until 16 and 17 years old, they are now living until 9 or 10 years old. Golden Retrievers seem to be dying mostly of bone …",
77+
"ad": false,
78+
"engine": "bing"
79+
},
80+
{
81+
"rank": 3,
82+
"url": "http://www.baidu.com/link?url=2544q3ugc68j0scVxdpWCSX-gl2AmuCy1l7uRR3loIfS1hmJWMiJKW4MDGWoZrLE7X-ybu1L7T8PspoL7iy_dK",
83+
"title": "golden retrievers是什么意思_golden retrievers怎么读_解释_用法...",
84+
"description": "\n\n2025年9月21日golden retrievers 读音:美英 golden retrievers基本解释 金毛猎犬 分词解释 golden金(黄)色的 retrievers寻猎物犬( retriever的名词复数 ) 词组短语 golden retrieversfor sale出售金毛寻回犬 golden retrieversnear me我附近的金毛寻回犬 golden retrieverspuppies金毛寻回犬幼犬...\ndanci.gei6.com/golden...retrievers...",
85+
"ad": false,
86+
"engine": "baidu"
87+
}
88+
]
89+
```
90+
6091
### Megaimage (Image Results)
6192

6293
```bash

duckduckgo/search.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,7 @@ func (ddg *DuckDuckGo) Search(query core.Query) ([]core.SearchResult, error) {
175175
return nil, err
176176
}
177177

178-
// Navigate to a page that can detect headless browsers
179-
page, err := ddg.Navigate("https://localhost:9001/?spjs_test_redirect=true")
180-
page.WaitLoad()
181-
if err != nil {
182-
ddg.logger.Fatal("Error navigating to bot detection site: %s", err)
183-
}
184-
page.MustScreenshotFullPage("./ddg_headless1.png")
185-
186-
page, err = ddg.Navigate(url)
178+
page, err := ddg.Navigate(url)
187179
if err != nil {
188180
return nil, err
189181
}

0 commit comments

Comments
 (0)