Skip to content

Commit

Permalink
Issue #93 new swisspeddose URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro Bettarini committed Jun 11, 2019
1 parent 038d7bd commit d86a143
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ esac
done
LC_COLLATE=$old_lc_collate
}

#-------------------------------------------------------------------------------
# epha no longer needed
#wget -N http://download.epha.ch/cleaned/produkte.json -O epha_products_de_json.json
Expand Down Expand Up @@ -110,6 +110,7 @@ wget --header "Host: db.swisspeddose.ch" \
"$URL/dashboard" -O dashboard.html

FILENAME=$(grep 'a href="/app/uploads/xml_publication/swisspeddosepublication' dashboard.html | awk -F\" '{print $4}')
BASENAME=swisspeddosepublication

wget --header "Host: db.swisspeddose.ch" \
--user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0" \
Expand All @@ -120,7 +121,13 @@ wget --header "Host: db.swisspeddose.ch" \
--load-cookies=cookiesB.txt \
--header 'Upgrade-Insecure-Requests: 1' \
"${URL}${FILENAME}" \
-O swisspeddosepublication.xml
-O $BASENAME.zip

unzip $BASENAME.zip

rm $BASENAME.zip
rm SwissPedDosePublication.xsd
mv SwissPedDosePublication.xml $BASENAME.xml

rm cookies*.txt
rm dashboard.html
Expand Down

0 comments on commit d86a143

Please sign in to comment.