cache v1 + debug mode + buttons on text results
This commit is contained in:
parent
9208104ff7
commit
d5bbfe118d
9 changed files with 228 additions and 65 deletions
|
@ -56,9 +56,9 @@ func fetchImageResults(query string, safe, lang string, page int) ([]ImageSearch
|
|||
offset = (page - 1) * resultsPerPage
|
||||
}
|
||||
|
||||
// Ensuring safe search is enabled by default if not specified
|
||||
// Ensuring safe search is disabled by default if not specified
|
||||
if safe == "" {
|
||||
safe = "1"
|
||||
safe = "0"
|
||||
}
|
||||
|
||||
// Defaulting to English Canada locale if not specified
|
||||
|
@ -66,8 +66,7 @@ func fetchImageResults(query string, safe, lang string, page int) ([]ImageSearch
|
|||
lang = "en_CA"
|
||||
}
|
||||
|
||||
// Format &lang=lang_de is incorret, implement fix !
|
||||
|
||||
// Format &lang=lang_de is incorrect, implement fix !
|
||||
apiURL := fmt.Sprintf("https://api.qwant.com/v3/search/images?t=images&q=%s&count=%d&locale=%s&offset=%d&device=desktop&tgp=2&safesearch=%s",
|
||||
url.QueryEscape(query),
|
||||
resultsPerPage,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue