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

8
LINES

< > BotCompany Repo | #1008457 // macmillanDefinitions2

JavaX fragment (include)

static Pair<S, L<S>> macmillanDefinitions2(S word) {
  S url = "http://www.macmillandictionary.com/dictionary/british/" + urlencode(word);
  S html = loadPageWithUserAgent(url, "Mac Safari");
  L<S> tok = htmlTok(html);
  ret pair(
    trimJoin(dropTagsAndHTMLComments(unnull(first(        findContainerTagWithParamsDeep(tok, "span", "class" := "BASE"))))),
    (L<S>) map(fg(f trimJoin, f dropTagsAndHTMLComments), findContainerTagWithParamsDeep(tok, "span", "class" := "DEFINITION")));
}

Author comment

Began life as a copy of #1008455

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1008457
Snippet name: macmillanDefinitions2
Eternal ID of this version: #1008457/6
Text MD5: 0cf60d19e26b684060e1a170772b4410
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-14 04:23:52
Source code size: 496 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 497 / 518
Version history: 5 change(s)
Referenced in: [show references]