0

В базу заносится название и описание кино/сериала

This commit is contained in:
2017-04-07 15:30:37 +03:00
parent b732be993a
commit 8e4122afe0
7 changed files with 28 additions and 13 deletions

View File

@@ -55,7 +55,12 @@ public class SeasonvarScanner implements ScannerCinema {
File saveTo = new File(this.saveTo, url.substring(url.indexOf("/")+1, url.lastIndexOf("."))+".jpg");
this.fileDownloader.addFile(element.attr("src"), saveTo);
CinemaDocument cinemaDocument = new CinemaDocument(saveTo.getAbsolutePath(), this.getName());
CinemaDocument cinemaDocument = new CinemaDocument();
String title = document.getElementsByClass("pgs-sinfo-title").get(0).text();
cinemaDocument.setTitle(title.replaceAll("^Сериал ", "").replaceAll(" онлайн$", ""));
cinemaDocument.setDescription(document.getElementsByAttributeValue("itemprop", "description").get(0).text());
cinemaDocument.setFileName(saveTo.getAbsolutePath());
cinemaDocument.setTypeWarez(this.getName());
this.repository.save(cinemaDocument);
}
}