PHPackages                             bulfaitelo/tesouro-direto-scraper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bulfaitelo/tesouro-direto-scraper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bulfaitelo/tesouro-direto-scraper
=================================

The scripts with selenium use, extracts the data from the direct treasury

1.0.4(7y ago)7213MITPython

Since Jan 14Pushed 7y ago1 watchersCompare

[ Source](https://github.com/bulfaitelo/Tesouro-Direto-Scraper)[ Packagist](https://packagist.org/packages/bulfaitelo/tesouro-direto-scraper)[ Docs](https://github.com/bulfaitelo/Tesouro-Direto-Scraper)[ RSS](/packages/bulfaitelo-tesouro-direto-scraper/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Select Language: **English**, [Portuguese](https://github.com/bulfaitelo/Tesouro-Direto-Scraper/blob/master/README-pt.md)
=========================================================================================================================

[](#select-language-english-portuguese)

Tesouro direto Scraper
======================

[](#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
------------

[](#installation)

The preferred way to install the Yii framework is through [composer](http://getcomposer.org/download/).

Either run

```
composer require bulfaitelo/tesouro-direto-scraper

```

or add

```
"bulfaitelo/tesouro-direto-scraper": "^1.0",
```

to the require section of your composer.json.

Requeriments
------------

[](#requeriments)

- **selenium** (`$ pip install selenium`)

To use
------

[](#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

[](#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

[](#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
------

[](#return)

Returns a json with the data:

### Extrato:

[](#extrato)

- titulo
- vencimento
- valor\_investido
- valor\_bruto\_atual
- valor\_liquido\_atual
- quant\_total
- quant\_bloqueado

### Protocolo:

[](#protocolo)

- numero\_protocolo
- operacao
- situacao
- realizacao
- liquidacao
- nome\_representante
- titulo
- quantidade
- valor\_unitario
- taxa\_juros
- taxa\_b3
- taxa\_custodia
- valor\_total

### Protocolo:

[](#protocolo-1)

- numero\_protocolo
- operacao
- situacao
- realizacao
- liquidacao
- representante
- titulo
- quantidade
- valor\_unitario
- taxa\_juros
- taxa\_b3
- taxa\_custodia
- valor\_total

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Total

3

Last Release

2697d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f3b109ac2778cd0e2fec66f7f7da2cd849e4c853092f777f0976596f0f6ba56b?d=identicon)[bulfaitelo](/maintainers/bulfaitelo)

---

Top Contributors

[![bulfaitelo](https://avatars.githubusercontent.com/u/4989569?v=4)](https://github.com/bulfaitelo "bulfaitelo (19 commits)")

---

Tags

scraperTesouro Direto

### Embed Badge

![Health badge](/badges/bulfaitelo-tesouro-direto-scraper/health.svg)

```
[![Health](https://phpackages.com/badges/bulfaitelo-tesouro-direto-scraper/health.svg)](https://phpackages.com/packages/bulfaitelo-tesouro-direto-scraper)
```

###  Alternatives

[raiym/instagram-php-scraper

Instagram PHP Scraper. Get account information, photos and videos without any authorization

3.3k1.2M6](/packages/raiym-instagram-php-scraper)[vdb/php-spider

A configurable and extensible PHP web spider

1.3k184.2k7](/packages/vdb-php-spider)[nelexa/google-play-scraper

Scrapes app data from Google Play store.

89505.3k](/packages/nelexa-google-play-scraper)[crwlr/crawler

Web crawling and scraping library.

36816.4k2](/packages/crwlr-crawler)[raulr/google-play-scraper

A PHP scraper to get app data from Google Play

12894.3k](/packages/raulr-google-play-scraper)[eddieace/php-simple

1363.7k](/packages/eddieace-php-simple)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
