Open topic with navigation

# Retrieve Recently Updated Content

In some cases you might want to retrieve information from the Web only when it has been recently updated. For example, if you are crawling a news site, you might want to restrict the synchronize task to retrieve pages that were updated in the last 30 days.

To retrieve Web pages based on the date, the Web Connector must be able to extract a date for each page. The connector can extract a date from either the page URL or the page content.

To retrieve pages based on the date

1. Stop the connector and open the configuration file.

2. Modify your fetch task by adding the relevant parameters from the following list, so that the connector can extract the date associated with a page:

   `DateInUrl` | A Boolean value that specifies whether the date associated with a Web page can be extracted from the page URL. When you set this parameter to `TRUE`, the connector attempts to extract the date from the URL. Only if the connector fails to extract the date from the URL does it attempt to extract the date from the page content.
   `PageDateSelector` | A list of CSS2 selectors to identify elements in the page content that might contain the date associated with a Web page. If the date is contained in the element's content, setting this parameter is sufficient to extract the date. If the date is contained in one of the element's attributes, set this parameter and then set `PageDateAttribute` to identify the attribute.
   `PageDateAttribute` | A list of attributes (on elements listed by `PageDateSelector`) that contain the date associated with the Web page.
   `DateFormats` | A comma-separated list of date formats to use when searching for a date in the URL or content of a page.

3. Choose which pages to retrieve:

   - To configure a rolling limit, for example to retrieve pages that are not more than 30 days old when the synchronize task starts, set the following parameters:

     `MaxPageAge` | The maximum age that a page can reach and still be ingested.
     `MinPageAge` | The minimum age that a page must reach before it is ingested.

   - To configure a fixed limit, for example to retrieve pages that were updated after 01 July 2015, set the following parameters:

     `MaxPageDate` | Filters the pages that are ingested by date. The connector only ingests pages that are newer than the specified date.
     `MinPageDate` | Filters the pages that are ingested by date. The connector only ingests pages that are older than the specified date.

4. (Optional) By default the connector ingests pages where it cannot determine a date. To prevent the connector from ingesting these pages, set the parameter `IngestPagesWithNoDate` to `False`.
5. (Optional) By default the connector does crawl pages that are outside your specified date range, even though they are not ingested. To prevent the connector following links from these pages, you can set the parameter `SpiderDateFilteredPages` to `False`.
6. Save and close the configuration file.

## Example

The following example configuration retrieves pages that are less than 30 days old, based on a date contained in the URL or in the page content:

    [MyTask]
    Url=http://www.autonomy.com
    ...
    DateInUrl=true
    PageDateSelector=p[id=date]
    MaxPageAge=30 days
    IngestPagesWithNoDate=False
    SpiderDateFilteredPages=False

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close We welcome your comments! To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm