Fórumok

Nyitólap » Liferay Portal » English » 3. Development

Kombinált nézet Egyszerű nézet Fa-nézet
Szálak [ Előző | Következő ]
toggle
Jean Gerard
How about web clipping/scrapping
2012. június 5. 11:50
Válasz

Jean Gerard

Rangsorolás: New Member

Hozzászólások: 10

Csatlakozás dátuma: 2012. június 5.

Legújabb hozzászólások

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
2012. június 5. 14:35
Válasz

Jelmer Kuperus

Rangsorolás: Liferay Legend

Hozzászólások: 1187

Csatlakozás dátuma: 2010. március 10.

Legújabb hozzászólások

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
2012. június 5. 16:45
Válasz

David H Nebinger

Rangsorolás: Liferay Legend

Hozzászólások: 4496

Csatlakozás dátuma: 2006. szeptember 1.

Legújabb hozzászólások

I've had a lot of luck w/ htmlparser.
Jean Gerard
RE: How about web clipping/scrapping
2012. június 12. 1:50
Válasz

Jean Gerard

Rangsorolás: New Member

Hozzászólások: 10

Csatlakozás dátuma: 2012. június 5.

Legújabb hozzászólások

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
2012. június 12. 12:22
Válasz

Corné Aussems

Rangsorolás: Liferay Legend

Hozzászólások: 1181

Csatlakozás dátuma: 2006. október 3.

Legújabb hozzászólások