fix(metadata): match new lubimyczytac HTML for search (#1608)
This commit is contained in:
@@ -178,11 +178,12 @@ public class LubimyCzytacParser implements BookParser {
|
|||||||
|
|
||||||
private static List<String> extractBookUrls(Document doc) {
|
private static List<String> extractBookUrls(Document doc) {
|
||||||
List<String> bookUrls = new ArrayList<>();
|
List<String> bookUrls = new ArrayList<>();
|
||||||
Elements results = doc.select(".authorAllBooks__single");
|
// Prefix with the paginator to avoid the promoted books / advertisements
|
||||||
|
Elements results = doc.select("#ksiazkiPaginator .book-card");
|
||||||
log.info("Found {} search results", results.size());
|
log.info("Found {} search results", results.size());
|
||||||
|
|
||||||
for (Element result : results) {
|
for (Element result : results) {
|
||||||
Element titleLink = result.selectFirst(".authorAllBooks__singleTextTitle");
|
Element titleLink = result.selectFirst(".book-card__title");
|
||||||
if (titleLink != null) {
|
if (titleLink != null) {
|
||||||
String href = titleLink.attr("href");
|
String href = titleLink.attr("href");
|
||||||
if (href != null && !href.isEmpty()) {
|
if (href != null && !href.isEmpty()) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user