Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Jean Gerard
How about web clipping/scrapping
5 de Junho de 2012 11:50
Resposta

Jean Gerard

Ranking: New Member

Mensagens: 10

Data de entrada: 5 de Junho de 2012

Mensagens recentes

Hello,

i am searching for some weeks now, but i never found anything about it.

I want to create a web clipping/scrapping portlet by myself and i don't found any help.

Anybody already had develop such as this portlet?

Can you help me, give me some advices etc...

Thank you very much.
Jelmer Kuperus
RE: How about web clipping/scrapping
5 de Junho de 2012 14:35
Resposta

Jelmer Kuperus

Ranking: Liferay Legend

Mensagens: 1192

Data de entrada: 10 de Março de 2010

Mensagens recentes

What kind of help are you looking for ?

When i screenscrape something i usually just use commons http client and scrape the relevant sections using regular expressions or nekohtml
David H Nebinger
RE: How about web clipping/scrapping
5 de Junho de 2012 16:45
Resposta

David H Nebinger

Community Moderator

Ranking: Liferay Legend

Mensagens: 11304

Data de entrada: 1 de Setembro de 2006

Mensagens recentes

I've had a lot of luck w/ htmlparser.
Jean Gerard
RE: How about web clipping/scrapping
12 de Junho de 2012 01:50
Resposta

Jean Gerard

Ranking: New Member

Mensagens: 10

Data de entrada: 5 de Junho de 2012

Mensagens recentes

What kind of help are you looking for ?


For example, i want to do it in the client(in my jsp), can i use jquery? Do exist an plugins jquery for web clipping?


I obviously missed one thing into htmlparser.

So, i had this :

 1protected String showView(ModelMap model) {
 2
 3        try {
 4
 5            Parser parser = new Parser("myurl");
 6            HasAttributeFilter filterattr = new HasAttributeFilter("id", "logo");
 7                listenode = parser.parse(filterattr);
 8            resultnode = listenode.toHtml();
 9
10        } catch (ParserException e) {
11            // TODO Auto-generated catch block
12            e.printStackTrace();
13
14        }
15
16        model.addAttribute("attrclipping", resultnode);
17
18        return "webclippingserver/webclippingserver";
19    }


But i had no results with this, when i tried a .size() on resultnode i have a 0.

Did i miss something?

thank you
Corné Aussems
RE: How about web clipping/scrapping
12 de Junho de 2012 12:22
Resposta