Last active
February 25, 2024 18:51
-
-
Save Dalboz/60187bdcde7bf93574613e96a60ad028 to your computer and use it in GitHub Desktop.
one liner para ver el precio del dólar paralelo :(
This file contains 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
python -c "import requests; print({key: value for key, value in requests.post('https://dolartoday.com/wp-admin/admin-ajax.php', data={'action': 'dt_currency_calculator_handler', 'amount': '1'}).json().items()})" |
This file contains 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
# Modulos requeridos: LWP::Simple, LWP::UserAgent Mozilla::CA, JSON | |
perl -MLWP::Simple -MJSON -e '$ref = JSON->new->utf8(0)->decode(get("https://s3.amazonaws.com/dolartoday/data.json")); print $ref->{'USD'}{'transferencia'}. "\n";' |
This file contains 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
# dolar transferencia | |
curl -s 'https://s3.amazonaws.com/dolartoday/data.json' | python -c "import sys, json; print(json.load(sys.stdin)['USD']['transferencia'])" |
Ya no existe el repositorio en amazon.
Conocerás otro repositorio de donde obtener el dato?
@siberiaaa puedes intentar haciendo un post como el que pongo:
curl -X POST -d "action=dt_currency_calculator_handler&amount=10" https://dolartoday.com/wp-admin/admin-ajax.php
Dejo un script en python que hace la misma función.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ya no existe el repositorio en amazon.