> Hi,
>
> I am trying to implement a plugin of indexing and parsing for specific
> purpose. I need to get the last-modified http field of the html
> documents, to have an estimation of the publishing date of the
> documents. If I try with
> parse.getData().getContentMeta().get(org.apache.nutch.metadata.HttpHeaders.LAST_MODIFIED)
> it returns null because the last-modified http information is not stored
> in the metadata. Does anyone know how to get it?, do I need to change
> the fetcher?, any advice will be very useful.
>
> Thanks in advance.
>
> Javier.
>
I was trying to modify the fetcher to store the lastmodified data as a
metadata field, but with the next code always returns 0 from the
getLastModified();
redirecting = false;
Protocol protocol = this.protocolFactory.getProtocol(url.toString());
ProtocolOutput output = protocol.getProtocolOutput(url, datum);
ProtocolStatus status = output.getStatus();
Content content = output.getContent();
ParseStatus pstatus = null;
switch (status.getCode()) {
case ProtocolStatus.SUCCESS: // got a page
lastmodified = status.getLastModified();
I am still lost. I do not know how to get the lastmodified information,
any help will be very useful.
Thanks
Javier.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nutch-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-developers