diff --git a/generate.sh b/generate.sh
index 0297d41..3a7ee53 100755
--- a/generate.sh
+++ b/generate.sh
@@ -13,7 +13,7 @@ LC=${LC:-""}
if [[ "$LC" != "" ]]; then
LC="/$LC"
fi
-MAIN_STORY_URL="https://www.theickabog.com$LC/read-the-story/"
+MAIN_STORY_URL="https://web.archive.org/web/20200713135719/https://www.theickabog.com$LC/read-the-story/"
echo "[+] Fetching $MAIN_STORY_URL"
@@ -31,14 +31,14 @@ echo "
$MAIN_TITLE$3" >> "$HTML_FILE"
- cat "html/$2.html" | pup 'article div.row:nth-child(2) div.entry-content' >> "$HTML_FILE"
+ cat "html/$2.html" | pup -p --charset UTF-8 'article div.row:nth-child(2) div.entry-content' >> "$HTML_FILE"
}
cat "$MAIN_STORY_OUTPUT_FILE" |
-pup 'ul.chapters__list a json{}' |
+pup -p --charset UTF-8 'ul.chapters__list a json{}' |
jq -r '[.[] | {url: .href, chapter: .children[0].children[0].children[0].children[0].text, title: .children[0].children[0].children[0].children[1].text}] | sort_by(.chapter | match("[0-9]+$")) | .[]|[.chapter, .title, .url] | @tsv' |
while IFS=$'\t' read -r chapter title url; do download_chapter "$url" "$chapter" "$title"; done