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

8
LINES

< > BotCompany Repo | #1008457 // macmillanDefinitions2

JavaX fragment (include)

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

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: 570 / 595
Version history: 5 change(s)
Referenced in: [show references]