Skip to content

Commit

Permalink
Fix #319 - images non affichées suite à changement plugin WP côté Next
Browse files Browse the repository at this point in the history
  • Loading branch information
AnaelMobilia committed Aug 19, 2024
1 parent 90bb85b commit 227d9df
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/src/main/java/com/pcinpact/parseur/ParseurHTML.java
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,15 @@ public static ArrayList<ArticleItem> getListeArticles(final String unContenu, fi
/*
<img style="display:block" class="lazyload" data-sizes="auto" data-srcset="https://i1.wp.com/next.ink/wp-content/uploads/2023/11/Capture-decran-2023-11-30-121406.png?w=75&resize=75 75w, https://i1.wp.com/next.ink/wp-content/uploads/2023/11/Capture-decran-2023-11-30-121406.png?w=100&resize=100 100w, https://i1.wp.com/next.ink/wp-content/uploads/2023/11/Capture-decran-2023-11-30-121406.png?w=150&resize=150 150w, https://i1.wp.com/next.ink/wp-content/uploads/2023/11/Capture-decran-2023-11-30-121406.png?w=240&resize=240 240w, https://i1.wp.com/next.ink/wp-content/uploads/2023/11/Capture-decran-2023-11-30-121406.png?w=320&resize=320 320w, https://i1.wp.com/next.ink/wp-content/uploads/2023/11/Capture-decran-2023-11-30-121406.png?w=500&resize=500 500w, https://i1.wp.com/next.ink/wp-content/uploads/2023/11/Capture-decran-2023-11-30-121406.png?w=640&resize=640 640w, https://i1.wp.com/next.ink/wp-content/uploads/2023/11/Capture-decran-2023-11-30-121406.png?w=800&resize=800 800w, https://i1.wp.com/next.ink/wp-content/uploads/2023/11/Capture-decran-2023-11-30-121406.png?w=1024&resize=1024 1024w, https://i1.wp.com/next.ink/wp-content/uploads/2023/11/Capture-decran-2023-11-30-121406.png?w=1280&resize=1280 1280w, https://i1.wp.com/next.ink/wp-content/uploads/2023/11/Capture-decran-2023-11-30-121406.png?w=1600&resize=1600 1600w" data-src="https://i1.wp.com/next.ink/wp-content/uploads/2023/11/Capture-decran-2023-11-30-121406.png" width="400px" height="300px" />
*/
lesImages = lArticle.select("img[data-src]");
lesImages = lArticle.select("img[data-src],img[fifu-data-src]");
// Pour chaque image
for (Element uneImage : lesImages) {
uneImage.attr("src", uneImage.attr("data-src"));
// 2024-08-20 : nouveau plugin utilisé par Next
String value = uneImage.attr("fifu-data-src");
if ("".equals(value)) {
value = uneImage.attr("data-src");
}
uneImage.attr("src", value);
}

// #317 - <figure>
Expand Down

0 comments on commit 227d9df

Please sign in to comment.