Add webp support. Provide the option to disable strict SSL to facilitate local testing.

This commit is contained in:
leon
2022-08-20 15:25:50 +01:00
committed by Will Boyd
parent a3aba85199
commit dd993b626b
4 changed files with 16 additions and 7 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ function getPostContent(postData, turndownService, config) {
if (config.saveScrapedImages) {
// writeImageFile() will save all content images to a relative /images
// folder so update references in post content to match
content = content.replace(/(<img[^>]*src=").*?([^/"]+\.(?:gif|jpe?g|png))("[^>]*>)/gi, '$1images/$2$3');
content = content.replace(/(<img[^>]*src=").*?([^/"]+\.(?:gif|jpe?g|png|webp))("[^>]*>)/gi, '$1images/$2$3');
}
// preserve "more" separator, max one per post, optionally with custom label