Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1032447 // googleSearch_uncached - uses Playwright [OK!]

JavaX fragment (include) [tags: use-pretranspiled]

Uses 64664K of libraries. Click here for Pure Java version (4812L/29K).

1  
static L<WithURL<S>> googleSearch_uncached(Browser browser, S query) {
2  
  temp var page = playwrightOpenPage(browser,
3  
    appendParamsToURL("https://google.com/search", q := query));
4  
    
5  
  L<ElementHandle> links1 = page.querySelectorAll("a[href]:has(h3)");
6  
  
7  
  LPairS links = map(links1, l -> pair(l.getAttribute("href"), trim(htmlDecode_dropTags(l.querySelector("h3").innerHTML()))));
8  
  
9  
  ret map(links, l -> WithURL(l.a, l.b));
10  
}

Author comment

Began life as a copy of #1032313

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1032447
Snippet name: googleSearch_uncached - uses Playwright [OK!]
Eternal ID of this version: #1032447/8
Text MD5: 11cb617979623f6d285e0e97e3b5cd1b
Transpilation MD5: dd33bf148023ca06b2b825222218dcfd
Author: stefan
Category: javax / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-06 16:25:53
Source code size: 442 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 157 / 229
Version history: 7 change(s)
Referenced in: [show references]