/**
 * Created by zhuang on 2017/3/23.
 */



import org.bee.webBee.Bee;
import org.bee.webBee.linker.Page;
import org.bee.webBee.processor.PageProcessor;
import org.bee.webBee.processor.Setting;
import org.jsoup.select.Elements;

/**
 * data 2017-03-23   01:19
 * E-mail   sis.nonacosa@gmail.com
 *
 * @author sis.nonacosa
 */

public class MainDemo implements PageProcessor {

    private Setting setting;

    @Override
    public void process(Page page) {
        Elements elements = page.getHtml().$("textarea.content").all();

        System.out.println("This is MainDemo's process function ...");
        System.out.println(elements);
    }

    @Override
    public Setting getSetting() {
        System.out.println("This is MainDemo's setting function ...");
        setting = Setting.create().setStartUrl("http://www.ZhiHu.com/explore");
        setting = setting.setCookies("z_c0","Mi4wQUFEQUZwSzEzZ2tBY01ERVdCM0lDUmNBQUFCaEFsVk5WQjcyV0FEb0RnYlI3QnFQSWtzSWMzTjRHQVN0YlNlTW1R");
        setting = setting.setCookies("_xsrf","8e8eedb720402d12bce9b5e611837b6d");
        setting = setting.setDomain("zhihu.com");
        return setting;
    }



    public static void main(String[] args) {
        Bee.create(new MainDemo()).run();
    }
}

@@ -39,16 +39,50 @@
 %0A */%0A%0A%0A%0A
+import com.alibaba.fastjson.JSON;%0A
 import o
@@ -483,24 +483,254 @@
 age page) %7B%0A
+        //todo page.getJson/html/string().$('textarea.content').as('content').bulid().$('#img').as('img')%0A        //todo %E6%9C%9F%E6%9C%9B%E7%BB%93%E6%9E%9C: %7Bcontent:%5B%5D,img:%5B%5D%7D %E4%B8%80%E6%9D%A1%7B%7D%E5%A4%9A%E6%9D%A1%5B%5D %E7%9A%84json%E6%A0%BC%E5%BC%8F%0A        //todo page.nextUrl('span%3Ess%3Es')%0A        //todo %E7%9B%B4%E6%8E%A5%E8%8E%B7%E5%8F%96api%E6%8E%A5%E5%8F%A3%0A
         Elem
@@ -896,16 +896,173 @@
 elements
+.toString());%0A%0A        String strJson= JSON.toJSONString(elements.toString());%0A        System.out.println(%22------------%22);%0A        System.out.println(strJson
 );%0A    %7D

add 4 todo