Download the PHP package bulfaitelo/tesouro-direto-scraper without Composer
On this page you can find all versions of the php package bulfaitelo/tesouro-direto-scraper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bulfaitelo/tesouro-direto-scraper
More information about bulfaitelo/tesouro-direto-scraper
Files in bulfaitelo/tesouro-direto-scraper
Package tesouro-direto-scraper
Short Description The scripts with selenium use, extracts the data from the direct treasury
License MIT
Homepage https://github.com/bulfaitelo/Tesouro-Direto-Scraper
Informations about the package tesouro-direto-scraper
Select Language: English, Portuguese
Tesouro direto Scraper
The scripts with selenium use, extracts the data from the direct treasury, extracting the extract and the protocols from the operations, and returning a json
Installation
The preferred way to install the Yii framework is through composer.
Either run
or add
to the require section of your composer.json.
Requeriments
- selenium (
$ pip install selenium)
To use
Run tesouro_direto_extrato.py whit cpf and password, you get current extract
To tesouro_direto_protocolo.py with cpf and password, you get current month protocol.
Optional
You can add a third parameter, to create a print screen error, defining file path. You can define erro name on default_file_name = 'erro.png'
Example
$ python tesouro_direto_extrato.py 1234567890 pass123
$ python tesouro_direto_extrato.py 1234567890 pass123 c:\error\dir/
$ python tesouro_direto_protocolo.py 1234567890 pass123
$ python tesouro_direto_protocolo.py 1234567890 pass123 /var/error/dir/
$ python tesouro_direto_precos_taxa_titulo.py
$ python tesouro_direto_precos_taxa_titulo.py /project_path/errors/
Return
Returns a json with the data:
Extrato:
-
titulo
- vencimento
- valor_investido
- valor_bruto_atual
- valor_liquido_atual
- quant_total
- quant_bloqueado
Protocolo:
- numero_protocolo
- operacao
- situacao
- realizacao
- liquidacao
- nome_representante
- titulo
- quantidade
- valor_unitario
- taxa_juros
- taxa_b3
- taxa_custodia
- valor_total
Protocolo:
- numero_protocolo
- operacao
- situacao
- realizacao
- liquidacao
- representante
- titulo
- quantidade
- valor_unitario
- taxa_juros
- taxa_b3
- taxa_custodia
- valor_total