Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Jean Gerard
How about web clipping/scrapping
5. Juni 2012 11:50
Antwort

Jean Gerard

Rang: New Member

Nachrichten: 10

Eintrittsdatum: 5. Juni 2012

Neue Beiträge

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. Juni 2012 14:35
Antwort

Jelmer Kuperus

Rang: Liferay Legend

Nachrichten: 1192

Eintrittsdatum: 10. März 2010

Neue Beiträge

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. Juni 2012 16:45
Antwort

David H Nebinger

Community Moderator

Rang: Liferay Legend

Nachrichten: 11060

Eintrittsdatum: 1. September 2006

Neue Beiträge

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

Jean Gerard

Rang: New Member

Nachrichten: 10

Eintrittsdatum: 5. Juni 2012

Neue Beiträge

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. Juni 2012 12:22
Antwort