From 06be216f4cb7a6751462b4f32877f0d6620b1b29 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Thu, 9 May 2019 00:27:28 +0000 Subject: [PATCH] Print Instagram ignore immediately after upload instead of at the end --- snscrape-upload | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/snscrape-upload b/snscrape-upload index b05b10e..b95ab10 100755 --- a/snscrape-upload +++ b/snscrape-upload @@ -1,8 +1,6 @@ #!/bin/bash scriptpath="$(cd "$(dirname "$0")"; pwd -P)" -instagramUrls=() - if [[ -e transfer ]] then echo "Error: ./transfer exists" >&2 @@ -29,21 +27,12 @@ do elif [[ "${f}" == instagram-* ]] then echo "!a < ${upurl}" - instagramUrls+=("${upurl}") + echo "!ig $("${scriptpath}/archivebot-jobid-calculation" "${upurl}") ^https?://www.instagram.com/.*[?&]hl=" else echo "!ao < ${upurl}" fi done 3>transfer -# Instagram ignores -if [[ ${#instagramUrls[@]} -gt 0 ]] -then - for url in "${instagramUrls[@]}" - do - echo "!ig $("${scriptpath}/archivebot-jobid-calculation" "${url}") ^https?://www.instagram.com/.*[?&]hl=" - done -fi - # chromebot for f in "$@" do