Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@StanAngeloff
Last active January 30, 2019 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StanAngeloff/dfab97ff84e77bb303847ffeb8ad4ee7 to your computer and use it in GitHub Desktop.
Save StanAngeloff/dfab97ff84e77bb303847ffeb8ad4ee7 to your computer and use it in GitHub Desktop.
Фибанк: СЛП (Лихвен процент, базиран на спестяванията) от терминала
#!/bin/sh
curl -sSL 'https://www.fibank.bg/bg/jilishten-kredit-pravo-na-izbor/page/3467' | \
pup -p '#AIRResults json{}' | \
jq '. as $page | $page | ( [ .[].children[] | select(has("children")) ] | map(.["children"][]["text"]) ) as $list | ( $list | [ range(0; $list | length; 2) | { ($list[.]): $list[(. + 1)] } ] | add ) as $currencies | [{ ($page[0].children[0].text): ($page[0].children[1].text) }, $currencies] | add'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment