diff --git a/.github/workflows/save-iregs.yml b/.github/workflows/save-iregs.yml index 3bcdbe2..c6278c7 100644 --- a/.github/workflows/save-iregs.yml +++ b/.github/workflows/save-iregs.yml @@ -31,7 +31,8 @@ jobs: CHUNKS=($(curl -sSL "https://www.consumerfinance.gov/rules-policy/regulations/${PART}/" | htmlq -t '.o-secondary-nav_link' -a href -b 'https://www.consumerfinance.gov' )) - echo "${CHUNKS[@]} found for part $PART at $(date '+%X')" + SUBPARTS=($(for chunk in "${CHUNKS[@]}"; do echo "$chunk" | awk -F '/' '{print $(NF-1)}'; done)) + echo "${SUBPARTS[@]} found for part $PART at $(date '+%X')" curl -sSL "${CHUNKS[@]}" | htmlq -r '.regulation-meta, .inline-interpretation, .block__sub, .o-regulations-wayfinder' | htmlq -t '.u-layout-grid_main' |