use of ar.rulosoft.navegadores.Navigator in project MiMangaNu by raulhaag.
the class NineManga method getImageFrom.
@Override
public String getImageFrom(Chapter chapter, int page) throws Exception {
Navigator nav = getNavigatorWithNeededHeader();
if (page == 1)
nav.addHeader("Referer", HOST + chapter.getPath());
else
nav.addHeader("Referer", HOST + chapter.getPath().replace(".html", "-" + (page - 1) + ".html"));
String data = nav.get(HOST + chapter.getPath().replace(".html", "-" + page + ".html"));
data = getFirstMatch(PATTERN_IMAGE, data, context.getString(R.string.server_failed_loading_image));
if (data.contains("////")) {
throw new Exception(context.getString(R.string.server_failed_loading_image));
}
return data;
}
use of ar.rulosoft.navegadores.Navigator in project MiMangaNu by raulhaag.
the class ReadMangaMe method search.
@Override
public ArrayList<Manga> search(String term) throws Exception {
Navigator nav = getNavigatorAndFlushParameters();
nav.addPost("q", term);
String data = nav.post(HOST + "/search");
return getMangasFromSource(data);
}
use of ar.rulosoft.navegadores.Navigator in project MiMangaNu by raulhaag.
the class ReadMangaToday method search.
@Override
public ArrayList<Manga> search(String term) throws Exception {
ArrayList<Manga> mangas = new ArrayList<>();
Navigator nav = getNavigatorAndFlushParameters();
nav.addHeader("x-requested-with", "XMLHttpRequest");
String data = getNavigatorAndFlushParameters().get(HOST + "/service/search?q=" + term.toLowerCase());
if (!data.equals("false")) {
JSONArray arr = new JSONArray(data);
for (int i = 0; i < arr.length(); i++) {
JSONObject m = arr.getJSONObject(i);
Manga manga = new Manga(getServerID(), m.getString("title"), m.getString("url"), false);
mangas.add(manga);
}
}
return mangas;
}
use of ar.rulosoft.navegadores.Navigator in project MiMangaNu by raulhaag.
the class Taadd method getImageFrom.
@Override
public String getImageFrom(Chapter chapter, int page) throws Exception {
Navigator nav = getNavigatorAndFlushParameters();
nav.addHeader("Referer", chapter.getPath());
String source = nav.get(chapter.getPath() + "-" + page + ".html");
return getFirstMatch("src=\"(http[s]?://pic\\.taadd\\.com/comics/[^\"]+?|http[s]?://pic\\d+\\.taadd\\.com/comics/[^\"]+?)\"", source, context.getString(R.string.server_failed_loading_image));
}
use of ar.rulosoft.navegadores.Navigator in project MiMangaNu by raulhaag.
the class TuMangaOnline method getNavWithNeededHeaders.
private Navigator getNavWithNeededHeaders() {
Navigator nav = getNavigatorAndFlushParameters();
nav.addHeader("Cache-mode", "no-cache");
nav.addHeader("Referer", "https://www.tumangaonline.com/biblioteca");
return nav;
}
Aggregations