use of ar.rulosoft.navegadores.Navigator in project MiMangaNu by raulhaag.
the class Kumanga method getMangasFiltered.
@Override
public ArrayList<Manga> getMangasFiltered(int[][] filters, int pageNumber) throws Exception {
Navigator nav = getNavigatorAndFlushParameters();
StringBuilder sb = new StringBuilder("contentType=manga&page=");
sb.append(pageNumber);
sb.append("&perPage=30&retrieveCategories=true&retrieveAuthors=true");
for (int i = 0; i < filters[0].length; i++) {
sb.append(valGenre[filters[0][i]]);
}
for (int i = 0; i < filters[1].length; i++) {
sb.append(valType[filters[1][i]]);
}
for (int i = 0; i < filters[2].length; i++) {
sb.append(valStatus[filters[2][i]]);
}
nav.addHeader("Accept-Language", "es-AR,es;q=0.8,en-US;q=0.5,en;q=0.3");
nav.addHeader("Accept-Encoding", "deflate");
nav.addHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
nav.addHeader("X-Requested-With", "XMLHttpRequest");
RequestBody body = RequestBody.create(MediaType.parse("application/x-www-form-urlencoded; charset=UTF-8"), sb.toString());
String data = nav.post(HOST + "/backend/ajax/searchengine.php", body);
return getMangasFromJson(new JSONObject(data));
}
Aggregations