В базу заносится название и описание кино/сериала
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user