Last active
January 30, 2019 13:50
-
-
Save StanAngeloff/dfab97ff84e77bb303847ffeb8ad4ee7 to your computer and use it in GitHub Desktop.
Фибанк: СЛП (Лихвен процент, базиран на спестяванията) от терминала
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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