Libraryless. Click here for Pure Java version (3912L/26K).
static LS qwantImageSearch(S query) { S page = loadPageWithUserAgentAndTimeout("https://api.qwant.com/api/search/images" + hquery( count := 50, q := query, t := "images", safesearch := 1, locale := "en_US", uiv := 4), "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36", 10.0); print(page); Map map = jsonDecodeMap(page); Map map2 = cast mapGet(map, "data"); Map map3 = cast mapGet(map2, "result"); L<Map> items = cast mapGet(map3, "items"); ret collect media(items); }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1027025 |
Snippet name: | qwantImageSearch |
Eternal ID of this version: | #1027025/3 |
Text MD5: | 84fe431029b8a80bf5a94237d5634903 |
Transpilation MD5: | 32df5cb24e342d02a07a11c1d4d53e4e |
Author: | stefan |
Category: | javax / networking |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-02-10 19:22:53 |
Source code size: | 596 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 295 / 417 |
Version history: | 2 change(s) |
Referenced in: | [show references] |