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

9
LINES

< > BotCompany Repo | #1011985 // Scrape synonym.com [OK]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (5720L/38K).

!7

p {
  S word = "singular";
  S url = "http://www.synonym.com/synonyms/" + urlencode(lower(word));
  S html = loadPageWithUserAgent(url, "Mac Safari");
  L<S> tok = htmlTok(html);
  pnl(multiSetByPopularity(asMultiSet(splitAtSpace(joinWithSpace(map(func(L<S> tok) -> S { dropPrefixTrim("Antonyms:", tok_html_noTags(tok)) }, findContainerTagWithParamsDeep(tok, "ul", "class" := "antonyms")))))));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1011985
Snippet name: Scrape synonym.com [OK]
Eternal ID of this version: #1011985/8
Text MD5: 39befa6f21c4ae2a7e005df47cae34d8
Transpilation MD5: 427ca9513146a0776f1503b64e45a08b
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-14 04:41:20
Source code size: 408 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 508 / 1114
Version history: 7 change(s)
Referenced in: [show references]