Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
oanderoficial authored May 28, 2024
1 parent 264c1a9 commit 04cee56
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
# numberlocator

Usando Python para descobrir operadora e região de um número de telefone.

<strong> Biblioteca: </strong>
```
pip install phonenumbers
```

<strong> 📦 Download: </strong> https://pypi.org/project/phonenumbers/

```python
import phonenumbers
```

<strong> # import geocoder, carrier </strong>
```python
from phonenumbers import geocoder, carrier
```

<strong> Especifique o número de telefone </strong>

```python
a =input("Digite o número de telefone:")
```
<strong> Região </strong>
```python
phonenumber = phonenumbers.parse(a)
```

<strong> Capturando a operadora </strong>
```python
operadora = carrier.name_for_number(phonenumber, 'pt-br')
```
<strong> Exibir a localização do número de telefone </strong>
```python
regiao = geocoder.description_for_number(phonenumber, 'pt-br')

print("O estado é: " +regiao)
print("a Operadora é:" + operadora)
```

0 comments on commit 04cee56

Please sign in to comment.