From 04cee56390f6b5edd746545eb2346311b07de406 Mon Sep 17 00:00:00 2001 From: "Anderson B Silva (Ander)" <32654298+oanderoficial@users.noreply.github.com> Date: Tue, 28 May 2024 18:30:05 -0300 Subject: [PATCH] Update README.md --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.md b/README.md index 8487a74..ff1f153 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,41 @@ # numberlocator Usando Python para descobrir operadora e região de um número de telefone. + + Biblioteca: +``` +pip install phonenumbers +``` + + 📦 Download: https://pypi.org/project/phonenumbers/ + +```python +import phonenumbers +``` + + # import geocoder, carrier +```python +from phonenumbers import geocoder, carrier +``` + + Especifique o número de telefone + +```python +a =input("Digite o número de telefone:") +``` + Região +```python +phonenumber = phonenumbers.parse(a) +``` + + Capturando a operadora +```python +operadora = carrier.name_for_number(phonenumber, 'pt-br') +``` + Exibir a localização do número de telefone +```python +regiao = geocoder.description_for_number(phonenumber, 'pt-br') + +print("O estado é: " +regiao) +print("a Operadora é:" + operadora) +```