Browse Source

netrc

master
Lennart Weller 2 weeks ago
parent
commit
5cd4a9c2bc
  1. 6
      weekly_download.sh

6
weekly_download.sh

@ -1,14 +1,14 @@
#!/bin/bash
latest=$(</home/lhw/.config/gardenersworld)
job=$(curl -s https://scrapyd.hh.wellr.net/schedule.json -d project=gardenersworld -d spider=hdclump_sitemap_spider | jq -r ".jobid")
job=$(curl -n -s https://scrapyd.hh.wellr.net/schedule.json -d project=gardenersworld -d spider=hdclump_sitemap_spider | jq -r ".jobid")
echo "[Queued] Job $job"
echo -n "[Waiting] "
until $(curl --output /dev/null --silent --head --fail https://scrapyd.hh.wellr.net/items/gardenersworld/hdclump_sitemap_spider/${job}.jl); do
until $(curl -n --output /dev/null --silent --head --fail https://scrapyd.hh.wellr.net/items/gardenersworld/hdclump_sitemap_spider/${job}.jl); do
printf '.'
sleep 2
done
printf "\n"
ep_data=$(curl -s https://scrapyd.hh.wellr.net/items/gardenersworld/hdclump_sitemap_spider/${job}.jl | jq -r "select(.episode > $latest)")
ep_data=$(curl -n -s https://scrapyd.hh.wellr.net/items/gardenersworld/hdclump_sitemap_spider/${job}.jl | jq -r "select(.episode > $latest)")
if [[ $ep_data != "" ]]; then
episode=$(jq -n --argjson data "$ep_data" '$data.episode')
zepisode=$(printf "%02d" $episode)

Loading…
Cancel
Save