import com.github.abola.CrawlerPack;

class PttGossiping {

  public static void main(String[] argv){
  
  }
}

@@ -17,16 +17,24 @@
 b.abola.
+crawler.
 CrawlerP
@@ -42,31 +42,425 @@
 ck;%0A
-%0Aclass PttGossiping %7B%0A%0A
+import org.jsoup.nodes.Element;%0Aimport org.jsoup.select.Elements;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A/**%0A * %E7%AF%84%E4%BE%8B: %E4%BD%BF%E7%94%A8%E7%88%AC%E8%9F%B2%E5%8C%85%E5%8F%96%E5%BE%97%E5%85%AB%E5%8D%A6%E7%89%88%E6%9C%80%E5%BE%8C50%E7%AF%87%E6%96%87%E7%AB%A0%E7%9A%84%E7%B6%B2%E5%9D%80%0A */%0Aclass PttGossiping %7B%0A%0A    final static String gossipMainPage = %22https://www.ptt.cc/bbs/Gossiping/index.html%22;%0A    final static String gossipIndexPage = %22https://www.ptt.cc/bbs/Gossiping/index%25s.html%22;%0A    // %E5%8F%96%E5%BE%97%E6%9C%80%E5%BE%8C%E5%B9%BE%E7%AF%87%E7%9A%84%E6%96%87%E7%AB%A0%E6%95%B8%E9%87%8F%0A    static Integer loadLastPosts = 50;%0A%0A  
   pu
@@ -501,11 +501,1066 @@
 v)%7B%0A
+%0A
   
-%0A
+      String prevPage =%0A            CrawlerPack.start()%0A                .addCookie(%22over18%22,%221%22)                // %E5%85%AB%E5%8D%A6%E7%89%88%E9%80%B2%E5%85%A5%E9%9C%80%E8%A6%81%E8%A8%AD%E5%AE%9Acookie%0A                .getFromHtml(gossipMainPage)            // %E9%81%A0%E7%AB%AF%E8%B3%87%E6%96%99%E6%A0%BC%E5%BC%8F%E7%82%BA HTML%0A                .select(%22.action-bar .pull-right %3E a%22)  // %E5%8F%96%E5%BE%97%E5%8F%B3%E4%B8%8A%E8%A7%92%E3%80%8E%E5%89%8D%E4%B8%80%E9%A0%81%E3%80%8F%E7%9A%84%E5%85%A7%E5%AE%B9%0A                .get(1).attr(%22href%22)%0A                .replaceAll(%22/bbs/Gossiping/index(%5B0-9%5D+).html%22, %22$1%22);%0A        // %E7%9B%AE%E5%89%8D%E6%9C%80%E6%9C%AB%E9%A0%81 index %E7%B7%A8%E8%99%9F%0A        Integer lastPage = Integer.valueOf(prevPage)+1;%0A%0A        List%3CString%3E lastPostsLink = new ArrayList%3CString%3E();%0A%0A        while ( loadLastPosts %3E lastPostsLink.size() )%7B%0A            String currPage = String.format(gossipIndexPage, lastPage--);%0A%0A            Elements links =%0A                CrawlerPack.start()%0A                    .addCookie(%22over18%22, %221%22)%0A                    .getFromHtml(currPage)%0A                    .select(%22.title %3E a%22);%0A%0A            for( Element link: links) lastPostsLink.add( link.attr(%22href%22) );%0A        %7D%0A%0A        // %E6%AA%A2%E8%A6%96%E7%B5%90%E6%9E%9C%0A        for(String url : lastPostsLink)%7B%0A            System.out.println(url);%0A        %7D%0A  
   %7D%0A

Update PttGossiping.java