Fix confusing shell issue
This commit is contained in:
parent
fee0c9dafa
commit
1a0700fd1a
|
@ -15,9 +15,9 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
UA='User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0'
|
UA='User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0'
|
||||||
URL='https://tes.collegesource.com/publicview/TES_publicview01.aspx?rid=f080a477-bff8-46df-a5b2-25e9affdd4ed&aid=27b576bb-cd07-4e57-84d0-37475fde70ce'
|
URL='https://tes.collegesource.com/publicview/TES_publicview01.aspx?rid=f080a477-bff8-46df-a5b2-25e9affdd4ed&aid=27b576bb-cd07-4e57-84d0-37475fde70ce'
|
||||||
HTML="$(curl -s -S -H "$UA" "$URL")"
|
curl -s -S -o "home.html" -H "$UA" "$URL"
|
||||||
echo "$HTML" | grep -A2 "<title>"
|
cat "home.html" | grep -A2 "<title>"
|
||||||
NUM_PAGES="$(echo "$HTML" | grep -e 'lblInstWithEQPaginationInfo' | grep -Poie '(?<=of )[0-9]*')"
|
NUM_PAGES="$(cat "home.html" | grep -e 'lblInstWithEQPaginationInfo' | grep -Poie '(?<=of )[0-9]*')"
|
||||||
echo "Found $NUM_PAGES pages"
|
echo "Found $NUM_PAGES pages"
|
||||||
MATRIX_PARAMS="$(seq -s "," 1 "$NUM_PAGES")"
|
MATRIX_PARAMS="$(seq -s "," 1 "$NUM_PAGES")"
|
||||||
MATRIX_PARAMS="\"page\": $(sed -e 's/,/}, {"page": /g' <<< "$MATRIX_PARAMS")"
|
MATRIX_PARAMS="\"page\": $(sed -e 's/,/}, {"page": /g' <<< "$MATRIX_PARAMS")"
|
||||||
|
|
Loading…
Reference in New Issue