Fórum

How about web clipping/scrapping

Jean Gerard, modificado 11 Anos atrás.

How about web clipping/scrapping

New Member Postagens: 10 Data de Entrada: 05/06/12 Postagens 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.
thumbnail
jelmer kuperus, modificado 11 Anos atrás.

RE: How about web clipping/scrapping

Liferay Legend Postagens: 1191 Data de Entrada: 10/03/10 Postagens 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
Jean Gerard, modificado 11 Anos atrás.

RE: How about web clipping/scrapping

New Member Postagens: 10 Data de Entrada: 05/06/12 Postagens 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 :

protected String showView(ModelMap model) {

		try {

			Parser parser = new Parser("myurl");
			HasAttributeFilter filterattr = new HasAttributeFilter("id", "logo");
		        listenode = parser.parse(filterattr);
			resultnode = listenode.toHtml();

		} catch (ParserException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();

		}

		model.addAttribute("attrclipping", resultnode);

		return "webclippingserver/webclippingserver";
	}


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

Did i miss something?

thank you
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: How about web clipping/scrapping

Liferay Legend Postagens: 14916 Data de Entrada: 02/09/06 Postagens Recentes
I've had a lot of luck w/ htmlparser.