If there's only one page in a forum, don't error out.
1 files changed, 4 insertions(+), 1 deletions(-)

M src/main/java/com/civfanatics/storyarchiver/StoryArchiver.java
M src/main/java/com/civfanatics/storyarchiver/StoryArchiver.java +4 -1
@@ 615,7 615,10 @@ validate:                   try {
 
     private void setInitialProgressEstimates(Document doc) throws NumberFormatException {
         Element pageNav = doc.getElementsByClass("PageNav").first();
-        Integer pages = Integer.parseInt(pageNav.attr("data-last"));
+        Integer pages = 1;  //default, if there's no pageNav, there's only one page
+        if (pageNav != null) {
+            pages = Integer.parseInt(pageNav.attr("data-last"));
+        }
         if (limitExists()) {
             pages = Math.min(pages, ARTIFICIAL_LIMIT);
             THREADS_PER_FORUM_PAGE = Math.min(THREADS_PER_PAGE, ARTIFICIAL_LIMIT);