Skip to content

Instantly share code, notes, and snippets.

@Uplink03
Last active July 7, 2020 20:04
Show Gist options
  • Save Uplink03/70224237fceba49962ac8a8adf35a065 to your computer and use it in GitHub Desktop.
Save Uplink03/70224237fceba49962ac8a8adf35a065 to your computer and use it in GitHub Desktop.
Get Wickes stocks for plaster
curl -s --location --request POST 'https://www.wickes.co.uk/store-pickup/220056/pointOfServices' \
--form 'stockFilter=on' \
--form 'latitude=51.5089281' \
--form 'longitude=-0.0221774' \
--form 'locationQuery=' \
--form 'cartPage=false' \
--form 'entryNumber=0'|grep 'drawMapWithStores(' |
sed -E 's/^.*drawMapWithStores\((.*)\);/\1/g' |
jq -r '.storeSearchPageData.results[] | ("Stock: \(.stockData.stockLevel)", "Description: \(.description)", "Distance: \(.formattedDistance)", "----")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment