fetch_gaidao.sh: Epubs are now linked on the overview page.

This commit is contained in:
tastytea 2020-09-17 19:39:15 +02:00
parent fdd1ab1ef8
commit a93eb2dfbf
1 changed files with 6 additions and 6 deletions

View File

@ -2,13 +2,13 @@
# Auf neue Ausgaben von der Gai Dao prüfen, herunterladen
cd ~/Documents/Zeitungen/Gaidao || exit 1
ausgaben=$(curl -s https://fda-ifa.org/gaidao/ausgaben/ \
| grep -Eo 'https://fda-ifa.org/gai-?dao-(n[or]-)?[0-9]+-[^/]*/')
for ausgabe in ${ausgaben}; do
url=$(curl -s "${ausgabe}" \
| grep -Eo 'https://fda-ifa.org/wp-content/uploads/[0-9]{4}/[0-9]{2}/[^ ]*\.epub')
file=$(echo "${url}" | grep -o '[^/]*\.epub')
ausgaben=$(curl -s https://fda-ifa.org/gaidao/ausgaben/ \
| grep -Eo 'https://fda-ifa.org/[^"]*\.epub' \
| head -n 5)
for url in ${ausgaben}; do
file=$(basename "${url}")
if [ -n "${file}" ] && [ ! -e "${file}" ]; then
echo "Downloading Gai Dao: ${file}."
curl -so "${file}" "${url}"