Merge pages in forum thread
|Top Previous Next|
This example shows how to follow to the next page in a forum thread once it is available.
The links to the previous and next pages are typically displayed as:
First ... 13, 14, 15 ... Last
If we are for example on page 14 and a link to page 15 already exists in the page, then this plugin will return the new URL so that WebSite-Watcher can merge the new page with the current page.
Links of the pages have the following format:
where 14 is the page number. The URL of the first page doesn't have the page number included, just topic123x.html
Each posting in that forum thread has a posting number that is displayed as # 12 for posting number 12. We will define a watch filter to monitor only the post numbers, then we will not get false positives if other content is changed, for example forum statistics, a changing date, advertisements, etc.
If a forum thread displays the page number via a parameter in the URL (for example &page=13), then the following code might be a starting point: