Foros de discusión

How about web clipping/scrapping

Jean Gerard, modificado hace 11 años.

How about web clipping/scrapping

New Member Mensajes: 10 Fecha de incorporación: 5/06/12 Mensajes recientes
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 hace 11 años.

RE: How about web clipping/scrapping

Liferay Legend Mensajes: 1191 Fecha de incorporación: 10/03/10 Mensajes recientes
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 hace 11 años.

RE: How about web clipping/scrapping

New Member Mensajes: 10 Fecha de incorporación: 5/06/12 Mensajes recientes
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 hace 11 años.

RE: How about web clipping/scrapping

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
I've had a lot of luck w/ htmlparser.