fetch_gaidao.sh: Epubs are now linked on the overview page.
This commit is contained in:
parent
fdd1ab1ef8
commit
a93eb2dfbf
|
@ -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}"
|
||||
|
|
Loading…
Reference in New Issue