Search in sources :

Example 1 with GetHtml

use of com.fba.GetHtml in project User-Behavior-in-Facebook by abozanona.

the class MyService method getFilters.

private void getFilters(final CallbackResponce fn) {
    String userId = MainActivity.c_user;
    String url = "https://mbasic.facebook.com/allactivity/options?id=" + userId;
    new GetHtml(url) {

        @Override
        public void getHtmlListener(String html) {
            Document dom0 = Jsoup.parse(html);
            Elements dom = dom0.select("li a");
            ArrayList<String> log_filters = new ArrayList<>();
            for (int i = 1; i < dom.size(); i++) {
                String url = dom.get(i).attr("href");
                log_filters.add(url.substring(url.lastIndexOf("=") + 1));
            }
            fn.Callback(log_filters);
        }
    };
}
Also used : GetHtml(com.fba.GetHtml) ArrayList(java.util.ArrayList) Document(com.jsoup.nodes.Document) Elements(com.jsoup.select.Elements)

Aggregations

GetHtml (com.fba.GetHtml)1 Document (com.jsoup.nodes.Document)1 Elements (com.jsoup.select.Elements)1 ArrayList (java.util.ArrayList)1