refactor out getChapterPages(), encode chapter url