Skip to content

Commit

Permalink
Subparts
Browse files Browse the repository at this point in the history
  • Loading branch information
wpears committed Feb 28, 2024
1 parent a9481da commit c6dbc7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/save-iregs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' |
Expand Down

0 comments on commit c6dbc7e

Please sign in to comment.