package Service;

import Model.ResultEntity;

/**
 * Created by 王渝 on 2016-10-15.
 * Email : wwangyuu@outlook.com
 * University : University of Electronic Science and Technology of Zhangjiang
 */
public class OfficialDocs_CPP implements IService {
    @Override
    public ResultEntity getResult(String keyword) {
        return null;
    }
}

@@ -61,10 +61,20 @@
  by 
-%E7%8E%8B%E6%B8%9D
+Mengxiao Lin
  on 
@@ -100,228 +100,1254 @@
 l : 
-wwangyuu@outlook.com%0A * University : University of Electronic Science and Technology of Zhangjiang%0A */%0Apublic class OfficialDocs_CPP implements IService %7B%0A    @Override%0A    public ResultEntity getResult(String keyword) %7B
+linmx0130@163.com%0A */%0Apublic class OfficialDocs_CPP implements IService %7B%0A    private static final String CPP_DOCS =%0A        %22http://en.cppreference.com/mwiki/index.php?search=%22;%0A    @Override%0A    public ResultEntity getResult(String keyword) %7B%0A        ResultEntity en = new ResultEntity();%0A        String html = NetWorking.GET(CPP_DOCS + keyword +String_DOCS2);%0A        Document doc = Jsoup.parse(html);%0A        Elements resultObject = doc.getElementsByClass(%22mw-search-results%22).first();%0A        if (resultObject == null)%7B%0A            return en;%0A        %7D%0A        Elements search_results = resultObject.children();%0A        for (Element ele : search_results) %7B%0A            Element result_link = ele.getElementsByTag(%22a%22).first();%0A            String href = link.attr(%22href%22);%0A            String title = link.text();%0A            String summary_text = title;%0A            String summary_html = title;%0A            System.out.println(href);%0A            System.out.println(title);%0A            System.out.println(summary_text);%0A            System.out.println(summary_html);%0A            System.out.println(%22---------------------------%22);%0A            Item i = new Item(DocType.OfficialDocs, title, summary_text, href);%0A            en.addItem(i);%0A        %7D
 %0A   
@@ -1358,20 +1358,18 @@
  return 
+e
 n
-ull
 ;%0A    %7D%0A

add official docs cpp