use of ar.rulosoft.mimanganu.componentes.Chapter in project MiMangaNu by raulhaag.
the class HeavenManga method loadMangaInformation.
@Override
public void loadMangaInformation(Manga manga, boolean forceReload) throws Exception {
String source = getNavigatorAndFlushParameters().get(manga.getPath());
// portada
manga.setImages(getFirstMatchDefault("<meta property=\"og:image\" content=\"(.+?)\"", source, ""));
// sinopsis
manga.setSynopsis(getFirstMatchDefault("<div class=\"sinopsis\">(.+?)<div", source, context.getString(R.string.nodisponible)));
// estado no soportado
// autor no soportado
manga.setAuthor(context.getString(R.string.nodisponible));
// genero
manga.setGenre(getFirstMatchDefault("nero\\(s\\) :(.+?)</div>", source, context.getString(R.string.nodisponible)));
// capitulos
Pattern p = Pattern.compile("<li><span class=\"capfec\">.+?><a href=\"(http://heavenmanga.com/.+?)\" title=\"(.+?)\"", Pattern.DOTALL);
Matcher matcher = p.matcher(source);
while (matcher.find()) {
manga.addChapterFirst(new Chapter(matcher.group(2), matcher.group(1)));
}
if (manga.getChapters().isEmpty()) {
throw new Exception(context.getString(R.string.server_failed_loading_chapter));
}
}
use of ar.rulosoft.mimanganu.componentes.Chapter in project MiMangaNu by raulhaag.
the class JapScan method loadMangaInformation.
@Override
public void loadMangaInformation(Manga manga, boolean forceReload) throws Exception {
if (manga.getChapters().isEmpty() || forceReload) {
String source = getNavigatorAndFlushParameters().get(manga.getPath());
// Cover Image
// JapScan has no cover images ...
manga.setImages("");
// Summary
manga.setSynopsis(getFirstMatchDefault("<div id=\"synopsis\">(.+?)</div>", source, context.getString(R.string.nodisponible)));
// Status
manga.setFinished(!getFirstMatchDefault("<div class=\"row\">.+?<div class=\"cell\">.+?<div class=\"cell\">.+?<div class=\"cell\">.+?<div class=\"cell\">.+?<div class=\"cell\">(.+?)</div>", source, "").contains("En Cours"));
// Author
manga.setAuthor(getFirstMatchDefault("<div class=\"row\">(.+?)</div>", source, context.getString(R.string.nodisponible)));
// Genres
manga.setGenre(getFirstMatchDefault("<div class=\"row\">.+?<div class=\"cell\">.+?<div class=\"cell\">.+?<div class=\"cell\">(.+?)</div>", source, context.getString(R.string.nodisponible)));
// Chapters
Pattern pattern = Pattern.compile("<a href=\"(//www\\.japscan\\.cc/lecture-en-ligne/[^\"]+?)\">(Scan.+?)</a>", Pattern.DOTALL);
Matcher matcher = pattern.matcher(source);
while (matcher.find()) {
manga.addChapterFirst(new Chapter(matcher.group(2), "http:" + matcher.group(1)));
}
}
}
use of ar.rulosoft.mimanganu.componentes.Chapter in project MiMangaNu by raulhaag.
the class Kumanga method loadMangaInformation.
@Override
public void loadMangaInformation(Manga manga, boolean forceReload) throws Exception {
if (manga.getChapters().isEmpty() || forceReload) {
String data = getNavigatorAndFlushParameters().get(manga.getPath());
// Cover
manga.setImages(getFirstMatchDefault("</div>\\s*<img src=\"([^\"]+)\"", data, ""));
// Author
manga.setAuthor(getFirstMatchDefault("<p><b>Autor: </b>(.+?)</p>", data, context.getString(R.string.nodisponible)));
// Genre
manga.setGenre(getFirstMatchDefault("GĂ©neros:(.+?)</div>", data, context.getString(R.string.nodisponible)).replaceAll("</a>\\s*<a", "</a>, <a"));
// Summary
manga.setSynopsis(getFirstMatchDefault("id=\"tab1\"><p>(.+?)</p>", data, context.getString(R.string.nodisponible)));
// Status
manga.setFinished(!getFirstMatchDefault("<p><b>Estado: </b>(.+?)</p>", data, "Activo").contains("Activo"));
// Chapters
Pattern pattern = Pattern.compile("<h4 class=\"title\">\\s*<a href=\"(manga[^\"]+).+?>(.+?)</i>", Pattern.DOTALL);
Matcher matcher = pattern.matcher(data);
while (matcher.find()) {
manga.addChapterFirst(new Chapter(matcher.group(2), HOST + "/" + matcher.group(1)));
}
}
}
use of ar.rulosoft.mimanganu.componentes.Chapter in project MiMangaNu by raulhaag.
the class MangaEden method loadMangaInformation.
@Override
public void loadMangaInformation(Manga manga, boolean forceReload) throws Exception {
if (manga.getChapters().isEmpty() || forceReload) {
String source = getNavigatorAndFlushParameters().get(manga.getPath());
// Front
String image = getFirstMatchDefault("<div class=\"mangaImage2\"><img src=\"(.+?)\"", source, "");
if (image.length() > 2) {
image = "http:" + image;
}
manga.setImages(image);
// Summary
manga.setSynopsis(getFirstMatchDefault("mangaDescription\">(.+?)</h", source, context.getString(R.string.nodisponible)));
// Status
manga.setFinished(getFirstMatchDefault("Status</h(.+?)<h", source, "").contains("Completed"));
// Author
manga.setAuthor(getFirstMatchDefault("Author</h4>(.+?)<h4>", source, context.getString(R.string.nodisponible)));
// Genres
manga.setGenre(getFirstMatchDefault("Genres</h4>(.+?)<h4>", source, context.getString(R.string.nodisponible)));
// Chapters
Pattern pattern = Pattern.compile("<tr.+?href=\"(/en/en-manga/.+?)\".+?>(.+?)</a", Pattern.DOTALL);
Matcher matcher = pattern.matcher(source);
while (matcher.find()) {
manga.addChapterFirst(new Chapter(matcher.group(2).replaceAll("Chapter", " Ch "), HOST + matcher.group(1)));
}
}
}
use of ar.rulosoft.mimanganu.componentes.Chapter in project MiMangaNu by raulhaag.
the class MangaEdenIt method loadMangaInformation.
@Override
public void loadMangaInformation(Manga manga, boolean forceReload) throws Exception {
if (manga.getChapters().isEmpty() || forceReload) {
String source = getNavigatorAndFlushParameters().get(manga.getPath());
// Front
String image = getFirstMatchDefault("<div class=\"mangaImage2\"><img src=\"(.+?)\"", source, "");
if (image.length() > 2) {
image = "http:" + image;
}
manga.setImages(image);
// Summary
manga.setSynopsis(getFirstMatchDefault("mangaDescription\">(.+?)</h", source, context.getString(R.string.nodisponible)));
// Status
manga.setFinished(getFirstMatchDefault("Stato</h(.+?)<h", source, "").contains("Completato"));
// Author
manga.setAuthor(getFirstMatchDefault("Autore</h4>(.+?)<h4>", source, context.getString(R.string.nodisponible)));
// Genres
manga.setGenre(getFirstMatchDefault("Genere</h4>(.+?)<h4>", source, context.getString(R.string.nodisponible)));
// Chapters
Pattern pattern = Pattern.compile("<a href=\"(/it/it-manga/[^\"]+)\" class=\"chapterLink\">(.+?)</a>", Pattern.DOTALL);
Matcher matcher = pattern.matcher(source);
while (matcher.find()) {
manga.addChapterFirst(new Chapter(matcher.group(2).replaceAll("Capitolo", " Cap "), HOST + matcher.group(1)));
}
}
}
Aggregations